Skip to Main Content
Password Security

Two-factor authentication: which second factor should you use?

Any second factor is a large improvement over none, but they are not equivalent. SMS codes can be intercepted, app codes can be relayed by a live phishing proxy, and only hardware keys and passkeys resist phishing outright.

Subash Poudel4 min read

The short answer

  1. Any second factor beats none. Do not let the search for the best option delay turning on the available one.
  2. SMS is the weakest common option - vulnerable to SIM swapping and interception - but still far better than a password alone.
  3. Authenticator app codes are stronger than SMS, but a live phishing proxy can relay a code in real time.
  4. Only hardware security keys and passkeys are phishing-resistant, because they refuse to respond to the wrong domain.
  5. Save your recovery codes somewhere offline. Losing access to a second factor without them is a genuine problem.

Two-factor authentication means a stolen password is not enough. That is a large improvement, and it is why the NCSC describes multi-factor authentication as one of the most effective protections available for a password-protected account.

But the available second factors differ considerably in what they actually resist, and the difference matters most against the attack you are most likely to meet.

The comparison

MethodResists stolen passwordResists SIM swapResists real-time phishing
SMS codeYesNoNo
Email codeYesYesNo
Authenticator app (TOTP)YesYesNo
Push approvalYesYesNo
Push with number matchingYesYesPartly
Hardware security keyYesYesYes
PasskeyYesYesYes

That final column is the one worth understanding, because it separates the options that depend on your vigilance from the ones that do not.

Why codes can be defeated

A modern phishing kit does not copy a login page. It proxies the real one.

You enter your password on the fake page. The kit submits it to the genuine site immediately. The genuine site sends you a genuine code. You type the code in. The kit uses it within its thirty-second window and captures the resulting session.

A hardware key or a passkey does not participate. It is bound to a domain, and the phishing site's domain is not that domain, so no response is produced at all. There is nothing for the proxy to relay.

Method by method

SMS — the weakest, still worth having

Vulnerable to SIM swapping: an attacker persuades your mobile provider to port your number to their device, usually armed with personal details gathered from breaches and social media. Once the number moves, every code follows.

It is also relayable by a phishing proxy like any other code.

Despite all that, SMS still defeats credential stuffing entirely, which is the highest-volume attack there is. If SMS is all a service offers, turn it on.

Authenticator app codes

A six-digit code generated on your device from a shared secret and the current time. No network involved, so nothing to intercept and nothing to SIM swap.

Still relayable in real time, but a clear improvement, and available almost everywhere. For most accounts this is the sensible default when passkeys are not offered.

Push approvals

A prompt appears on your phone; you tap approve. Convenient, and vulnerable to fatigue attacks — an attacker with your password triggers prompts repeatedly, at night, until someone taps approve to make it stop.

Number matching fixes most of this: the login screen shows a number you must select on your phone, so approving requires seeing the screen the attacker controls. Enable it where available.

Hardware security keys

A physical device you plug in or tap. Phishing-resistant for the reason described above, and effectively immune to remote attack — someone would need the physical key.

The cost is that you need one, ideally two so a loss is not a lockout. Worth it for email, financial accounts, and anything holding significant value.

Passkeys

The same cryptographic protection, without buying hardware, because the key lives on a device you already carry. A passkey replaces the password and the second factor, and it is where authentication is heading.

Full detail in what are passkeys.

Recovery codes

The step everyone skips, and the one that causes the most pain later.

When you enable two-factor authentication, the service gives you a set of one-time backup codes. Save them. Print them, or store them in your password manager under a separate entry, or both.

Without them, losing your phone means account recovery through support — which is slow, sometimes impossible, and occasionally the exact process an attacker would target.

What to do, in order

  1. Turn on the best available option for email first. Email resets everything else.
  2. Then banking and anything with stored payment details.
  3. Save every set of recovery codes as you go.
  4. Take passkeys wherever they appear.
  5. Consider a hardware key for your two or three most valuable accounts.

The specific attack that defeats SMS is worth understanding before you rely on it: SIM swap scams covers how a phone number is moved to someone else's device, and the free carrier lock that blocks it.

See each factor tested

Our demonstration runs SMS, an app code and a passkey through the same real-time phishing proxy — two get relayed, one refuses.

Try it free

Frequently asked questions

What is two-factor authentication?
A second proof of identity beyond your password, so that knowing the password is not enough to sign in. The factors are usually described as something you know (a password), something you have (a phone or security key), and something you are (a fingerprint or face).
Is SMS two-factor authentication safe?
It is much safer than no second factor and much weaker than the alternatives. SMS is vulnerable to SIM swapping, where an attacker transfers your number to their own device, and codes can be relayed by phishing pages in real time. If SMS is the only option a service offers, use it — but switch when something better appears.
What is a SIM swap attack?
An attacker persuades your mobile provider to move your phone number to a SIM they control, usually using personal details gathered from breaches or social media. Your number then rings on their device, and every SMS code goes to them. It is the specific reason SMS ranks lowest among the common second factors.
Which two-factor method is the most secure?
A hardware security key or a passkey. Both are bound to a specific domain, so they will not respond to a lookalike phishing site at all — the check happens between your device and the domain, without relying on you spotting anything. Codes of any kind can be relayed by a proxy in real time.
What happens if I lose my phone with the authenticator app on it?
This is what recovery codes are for. Every service that offers two-factor authentication gives you a set of one-time backup codes when you enable it — save them somewhere offline. Without them, and without a second registered device, recovering access can be slow and occasionally impossible.

Sources

  1. NIST SP 800-63B: Digital Identity Guidelines — National Institute of Standards and Technology, 2025
  2. Passkeys — FIDO Alliance, 2026
  3. Password policy: updating your approach — UK National Cyber Security Centre, 2025

About the author

Subash Poudel

Cybersecurity & Digital Literacy

Subash Poudel builds SafeSurf IQ, a digital literacy platform that teaches people to recognise scams by putting them in front of real ones. He writes the online-safety reference material here, working from primary reporting — FBI IC3, the FTC, Verizon's DBIR, NCSC and Ofcom — rather than secondhand summaries.

  • Founder and engineer, SafeSurf IQ
  • Writes and reviews the platform's phishing, scam and privacy curriculum
  • Works from primary incident and fraud reporting, cited on every article

Last reviewed . Figures are checked against the primary sources listed above at each review.