Technology & Digital Life

How Two-Factor Authentication Protects Your Accounts

Two-factor authentication means a stolen password alone isn’t enough to break into your account. But a text-message code, an authenticator app and a security key aren’t equally strong. Here’s how each one works and which to choose.

Daily Life Buzz Editorial 4 min readExplainer

In this article5 sections
  1. What “two factors” means
  2. How well does it work?
  3. The main methods, from weakest to strongest
  4. Setting it up
  5. Staying safe with codes

Every year, billions of usernames and passwords leak from hacked websites. Criminals collect them and try them automatically on email, banking, shopping and social media accounts, hoping people have reused the same password. Many have.

Two-factor authentication is one of the simplest ways to make a stolen password useless on its own.

What “two factors” means

Security experts group the ways of proving who you are into three types, called factors:

  • Something you know: a password or PIN
  • Something you have: your phone, or a physical security key
  • Something you are: your fingerprint or face

Two-factor authentication, often called 2FA or multi-factor authentication (MFA), means using two different types together. A password plus a code sent to your phone counts. Two passwords don’t, because they are both something you know.

The idea is simple: an attacker who has stolen your password still needs your phone or key, which they almost never have.

A stolen password on its own is no longer enough.

How well does it work?

Very well, even in its simplest forms. In 2019, Google researchers published a study of how different second factors performed against attacks on Google accounts:

Second factorAutomated bots blockedBulk phishing blockedTargeted attacks blocked
Text-message code100%96%76%
Prompt on your phone100%99%90%
Security key100%100%100%

Microsoft has reported similar findings, saying that accounts using multi-factor authentication are far less likely to be compromised.

The main methods, from weakest to strongest

Text-message (SMS) codes

The website texts you a short code to type in. It’s much better than nothing and very easy to use. But it has weaknesses: criminals can trick a mobile operator into moving your number to their SIM card (a SIM swap), and they can trick you into reading out the code on a phishing site or over the phone.

Authenticator app codes

Apps such as Google Authenticator, Microsoft Authenticator and many password managers show a six-digit code that changes every 30 seconds. When you set it up, the website and the app share a secret. Each code is then worked out from that secret and the current time, so the app doesn’t need a signal or internet connection. This avoids SIM swaps, but a well-made fake website can still trick you into typing the code.

Sign-in prompts on your phone

Some services, such as Google and Microsoft, send a prompt to your phone asking “Are you trying to sign in?” You tap yes or no, sometimes matching a number shown on screen. This is convenient and stronger than codes. Be careful of “prompt bombing”, where attackers who already have your password send prompt after prompt, hoping you’ll tap yes to make them stop. If you get a prompt you didn’t expect, deny it and change your password.

Passkeys and security keys

Hardware security keys are small USB, NFC or Bluetooth devices that you plug in or tap. Passkeys work in the same way but are stored on your phone or computer. Both use public-key cryptography and are tied to the real website’s address, so they can’t be phished. These are the strongest options available to most people. See how passkeys work.

Setting it up

  1. Start with your most important accounts: your main email (it’s used to reset everything else), your bank, your phone’s account (Apple, Google or Microsoft), and social media.
  2. Look in security settings for “two-step verification”, “two-factor authentication” or “sign-in options”.
  3. Choose the strongest option offered that you’re comfortable with: a passkey or security key, then an authenticator app or prompt, then text messages.
  4. Save your backup codes. Most services give you a set of one-time recovery codes. Print them or store them in a password manager, so you can get in if you lose your phone.

Staying safe with codes

  • Never share a code with anyone. No genuine company, bank or support team will ask you to read it out.
  • Check the website address before entering a code.
  • Deny prompts you didn’t start.
  • Keep your phone locked with a PIN or biometrics, so that someone who picks it up can’t see your codes.

Frequently asked questions

Is SMS 2FA still worth using?

Yes, if it’s the only option. It blocks most attacks. But if a stronger option is available, use that instead, especially for email and banking.

What happens if I lose my phone?

Use your backup codes, a second registered device, or the service’s account recovery process. If your authenticator app supports encrypted backup to your account, turn it on so codes move to a new phone.

Is 2FA the same as two-step verification?

The names are often used interchangeably. Strictly, two-step verification can mean two steps of the same type, but most services use the terms to mean the same thing.

Sources

  1. Google Security Blog (2019): New research: how effective is basic account hygiene at preventing hijacking
  2. US Cybersecurity and Infrastructure Security Agency (CISA): More than a password
  3. UK National Cyber Security Centre: Setting up two-step verification
  4. M'Raihi, D. et al. (2011). TOTP: Time-Based One-Time Password Algorithm. RFC 6238, Internet Engineering Task Force.

Fact-checked against the sources listed above. Spotted an error? Tell us. Read our editorial policy.