Two-Factor Authentication Explained: SMS, Apps, Keys and Passkeys

A second factor turns a stolen password into a dead end. Here is how each kind works, ranked from weakest to strongest, with a live demo of the code in your authenticator app.

Why a password alone is not enough

Passwords leak. They are phished, reused, cracked from breached databases, and typed into fake login pages. Two-factor authentication (2FA, or MFA when there may be more than two) adds a second proof that an attacker holding your password does not have. The factors are traditionally grouped as something you know (a password), something you have (a phone, a key) and something you are (a fingerprint). A second password is not a second factor.

The methods, weakest to strongest

SMS and voice codes

The site texts you a six-digit code. Better than nothing, and the most common option, but the weakest: SIM-swap attacks move your number to an attacker’s phone, SS7 network flaws allow interception, and a phishing page can simply ask you for the code and relay it. NIST has discouraged SMS for high-value accounts since 2017. Use it only when it is the only option.

Same idea by email. Slightly better than SMS, except that if the account you are protecting is your email, this is circular.

Authenticator apps (TOTP)

Google Authenticator, Authy, Microsoft Authenticator, and the built-in generators in 1Password and Bitwarden all use the same open standard: TOTP, time-based one-time passwords (RFC 6238). At setup the site shows a QR code containing a random secret. From then on, your app and the site both compute the same six-digit code every 30 seconds from that secret and the current time. Nothing is transmitted to your phone; it works in airplane mode.

The computation is an HMAC-SHA1 of the time counter under the secret, truncated to six digits. You can watch it happen on the TOTP generator with a test secret. Weakness: a phishing page can still ask for the current code and use it within the 30-second window. Real-time phishing kits do exactly that.

Push notifications with number matching

The site sends a prompt to your phone (“Approve sign-in from Chrome on Windows?”). Early versions were vulnerable to “MFA fatigue”: attackers spammed prompts until a tired user tapped approve. Modern versions show a number on the login screen that you must type into the phone, which defeats that.

Hardware security keys (FIDO2 / WebAuthn)

A YubiKey or similar device that signs a challenge with a private key that never leaves it. The signature is bound to the site’s real domain, so a phishing page on a look-alike domain receives a signature it cannot use. This is the only method that is phishing-proof by design. Google reported zero successful phishing attacks on its 85,000 employees after mandating keys. See hardware security keys.

Passkeys

The same FIDO2 cryptography, with the private key stored in your phone or computer’s secure hardware and synced through your platform account, unlocked by your fingerprint or face. Phishing-proof like a hardware key, with nothing extra to carry, and no password at all. Coverage is growing fast; see what are passkeys.

What to enable, in what order

  1. Your primary email. A password reset for every other account lands here. Use a passkey or hardware key if offered, an authenticator app otherwise.
  2. Your password manager. It holds everything else.
  3. Banking, brokerage, government services.
  4. Social media and anything with your card on file.

Prefer app or key over SMS wherever the choice exists, and remove your phone number as a recovery method once something better is in place.

Backup codes and recovery

Every 2FA setup offers one-time backup codes. Save them in your password manager or print them. Losing your second factor without backups can mean losing the account permanently; support desks are deliberately unhelpful here, because “I lost my phone, let me in” is what an attacker says too. Register two hardware keys, or a key plus an app, so one loss is an inconvenience rather than a lockout.

2FA does not fix a bad password

A second factor stops a stolen password from being enough. It does not stop the password from being stolen, and some sites let a session survive after the factor is checked once. Keep the password long and unique anyway, check it with the breach checker, and treat 2FA as the seatbelt, not the brakes.

New tools and guides, about once a month.

No tracking pixels, no upsells. Unsubscribe with one click.

Newsletter