Two-Factor Authentication Methods Compared
SMS codes, authenticator apps, push prompts, hardware keys, and passkeys compared on phishing resistance, SIM swap risk, recovery, and day-to-day convenience.
Short answer
Passkeys and hardware security keys are the strongest second factors because they cannot be phished, authenticator app codes come next, and SMS codes are the weakest option but still far better than a password alone.
Key takeaways
- Any second factor blocks most attacks that rely on a stolen or reused password.
- SMS codes can be intercepted through SIM swap and number porting fraud, and NIST lists phone-network delivery as a restricted method.
- Only cryptographic methods such as FIDO2 security keys and passkeys are phishing-resistant, because they check the website's domain for you.
Two-factor authentication (2FA) asks for something beyond your password before letting you in. The options a site offers can range from a text message to a USB key, and they differ a lot in how well they hold up against real attacks. Here is how each method works, where it fails, and which one to pick for which account.
What does two-factor authentication protect against?
A second factor stops attackers who have your password but not your device, which covers leaked, reused, and guessed passwords.
Most account takeovers start with a password obtained somewhere else: a breach at another site, a guess based on personal details, or malware. With 2FA on, that password alone is not enough. The methods below differ mainly in two ways: whether the second factor itself can be stolen or redirected, and whether a phishing site can trick you into handing it over in real time.
How do the main 2FA methods compare?
Cryptographic methods (passkeys and hardware keys) beat code-based methods, and codes sent by text message are the weakest of the common options.
| Method | How it works | Phishing-resistant | Main weakness | Works without phone signal |
|---|---|---|---|---|
| SMS or voice code | Site sends a code to your phone number | No | SIM swap, number porting, interception | No |
| Authenticator app (TOTP) | App generates a 6-digit code from a shared secret and the time | No | Code can be typed into a fake site | Yes |
| Push prompt | App shows an Approve or Deny prompt | No | Repeated prompts until you approve | No, needs data |
| Hardware security key | USB, NFC, or Bluetooth key signs a challenge (FIDO2/U2F) | Yes | Losing the key without a backup | Yes |
| Passkey | Device signs a challenge after a biometric or PIN check | Yes | Recovery depends on sync account or backup passkey | Yes |
NIST SP 800-63B-4 states that one-time codes and out-of-band methods (SMS, voice, push) are not phishing-resistant, because a person can enter or approve them on an impostor site. Only cryptographic authentication with channel binding or verifier name binding, such as WebAuthn, qualifies.
Why is SMS the weakest option?
SMS codes depend on your phone number, and attackers can take over a phone number through SIM swap or port-out fraud without touching your phone.
In a SIM swap, a criminal convinces or bribes someone at your carrier to move your number to a SIM card they control. Port-out fraud does the same by transferring your number to a different carrier. Either way, your texts, including login codes, start arriving on the attacker's phone. The US Federal Communications Commission has adopted rules requiring carriers to authenticate customers before moving numbers and to notify them when it happens.
NIST lists phone-network delivery of codes as a "restricted" authenticator. Services using it are told to watch for risk signals such as a recent SIM change or number port, and to offer an alternative method to every user.
Practical steps if SMS is all a site offers:
- Set a port-out PIN or account lock with your mobile carrier.
- Avoid using the same number for account recovery everywhere.
- Move to an app or passkey when the site adds one.
How do authenticator apps work?
Authenticator apps compute a short code from a secret shared with the site and the current time, so the code changes every 30 seconds and never travels over the phone network.
The method is called TOTP and is defined in RFC 6238, which extends the older counter-based HOTP algorithm (RFC 4226). When you scan the QR code during setup, the app stores a secret key. Every 30 seconds (the RFC's default time step) both the app and the server combine that secret with the current time and arrive at the same code.
TOTP removes the SIM swap risk and works offline. Its weakness is phishing: a convincing fake login page can ask for your password and your current code, then pass both to the real site within the 30-second window. Learning how to spot a phishing email is the main defense when you rely on codes.
Why are hardware keys and passkeys the strongest?
Security keys and passkeys check the website's domain before signing anything, so a lookalike site gets no usable response even if you are fooled.
Both use the FIDO2 standards. During sign-in, the browser tells the authenticator which domain is asking, and the authenticator only responds for the domain the credential was created for. There is no code for you to copy into the wrong place. A hardware key keeps its private keys on the device; a passkey may be device-bound or synced through a credential manager. Passkeys explained covers the differences.
The main cost is recovery planning. Register at least two keys, or a passkey plus a key, for accounts you cannot afford to lose.
Which method should you use for each account?
Use the strongest method each account supports, starting with email and your password manager, and always save backup codes.
- Email and password manager: passkey or hardware key, plus a second registered key or passkey.
- Banking and payment accounts: passkey if offered, otherwise an authenticator app; SMS only as a last resort.
- Social media and shopping: authenticator app or passkey.
- Every account: save the backup codes offline, such as printed and stored at home.
A strong, unique password still matters as the first factor; the password strength checker shows how long one needs to be.
Frequently asked questions
Is SMS two-factor authentication still worth using?
Yes, if it is the only option a site offers. It stops attackers who only have your password. Switch to an authenticator app or passkey as soon as the site supports one, especially for email and banking.
How long is an authenticator app code valid?
The TOTP standard, RFC 6238, uses a default time step of 30 seconds, so most apps show a new code every 30 seconds. Servers often accept a code from the adjacent window to allow for clock drift.
What should I do if I lose the phone with my authenticator app?
Use the backup codes you saved when you set up 2FA, or a second registered method, to sign in and remove the lost device. Some authenticator apps also offer encrypted cloud backup of their entries.
Are push notification prompts safe?
They are convenient but can be abused by attackers who send repeated prompts hoping you tap Approve. Prompts that make you type a number shown on the sign-in screen reduce that risk.
Sources
- RFC 6238: TOTP: Time-Based One-Time Password Algorithm
- NIST SP 800-63B-4: Authentication and Authenticator Management
- FIDO Alliance: Passkeys
- FCC: Port-Out Fraud and SIM Swap Fraud
Research-based: Technorat does not claim hands-on testing. See how we research. Spotted an error? contact@technorat.com