What a second factor is
CISA, the US cybersecurity agency, describes multi-factor authentication as a layered approach: a service asks for a second piece of evidence beyond the password, drawn from a different category. The categories are something you know (a password or PIN), something you have (a phone, a security key, a printed code list) and something you are (a fingerprint or face). Two things from the same category are not two factors. CISA's summary of the effect: users who enable MFA are significantly less likely to get hacked, because a stolen password alone no longer opens the account.
The methods, compared
| Method | Factor | Phishing resistant | Note |
|---|---|---|---|
| Passkey or security key (FIDO2 / WebAuthn) | Something you have (plus a PIN or fingerprint to unlock it) | Yes | The browser signs a challenge bound to the real site, so a look-alike site gets nothing useful |
| Authenticator app code (TOTP) | Something you have | No | Six-digit codes from a shared key; a code typed into a fake site works on the real one for its 30 seconds |
| App push with number matching | Something you have | No, but resists blind approval | You type the number shown on the login screen into the app, so a prompt you did not start cannot be approved by reflex |
| Plain app push ("Approve?") | Something you have | No | NIST no longer accepts approval-only prompts; attackers spam them until someone taps yes |
| SMS or voice call code | Something you have (the phone number) | No | NIST classes the phone network as a restricted channel: SIM swaps and number porting can redirect it |
| Email code | Something you have (the mailbox) | No | NIST says email shall not be used for out-of-band authentication |
| Backup codes (look-up secrets) | Something you have (the printed list) | No | One-time codes to keep offline for when the phone is lost; each is used once |
"Phishing resistant" is the column that matters. NIST SP 800-63B is explicit: passwords, look-up secrets, out-of-band codes and one-time-password apps are not phishing resistant, because typing a code into a page does not bind it to the real site; whatever you type into a convincing fake can be relayed to the real service within seconds. Phishing resistance requires a cryptographic authenticator, and NIST names WebAuthn, used by FIDO2 passkeys and security keys, as the example. CISA says the same from the other side: FIDO/WebAuthn is the only widely available phishing-resistant authentication, and it urges organisations to plan a move to it.
From strongest to weakest
- Passkeys and hardware security keys. The site sends a challenge, your device signs it with a private key the site never sees, and the signature is tied to the site's real domain. A fake domain gets a signature it cannot use. Passkeys live on your phone or computer and sync between devices; a hardware key is a small USB or NFC device that does the same job offline.
- Authenticator app codes (TOTP). The app and the server share a secret, set up by scanning a QR code, and both compute the same six-digit code every 30 seconds. Nothing travels over the phone network, so SIM swaps do not matter, but a code typed into a phishing page still works on the real site until it expires.
- Push with number matching. The login screen shows a number that you must enter in the app. CISA recommends number matching where phishing-resistant MFA is not yet possible, because it defeats the trick of sending prompts until a tired user taps approve.
- Plain push prompts. A simple "Approve?" dialog. NIST's current revision no longer accepts approval-only prompts; if a service offers both, pick number matching.
- SMS and voice codes. NIST classes out-of-band authentication over the public phone network as restricted: it still counts as a factor, but the service has to treat it as weaker and watch for signs such as a recent SIM change or number port before sending a code. Better than nothing, and the first thing to replace.
- Email codes. NIST says email shall not be used for out-of-band authentication; the mailbox is usually protected by the same kind of password the second factor is meant to back up.
Setting it up, in order
- Start with the accounts that unlock the others: the email account used for password resets, then banking, then the password manager, then everything else.
- Pick the strongest option each service offers: a passkey or security key where available, otherwise an authenticator app, otherwise SMS.
- Register two of them. Two security keys, or passkeys on two devices, or an app plus a key. A single phone is a single point of failure.
- Save the backup codes the service shows at setup. NIST's name for them is look-up secrets: each works once, so store the list where a lost phone cannot take it, such as a password manager or a printed sheet.
- Keep the password strong anyway. NIST sets 15 characters as the minimum for a password used by itself, 8 when it is one of two factors; the password generator produces one and the password strength checker estimates how long it would take to guess. The password length guide explains the NIST rules.
What the QR code at setup contains
When an authenticator app is set up, the service shows a QR code that encodes the shared secret, the account name and the issuer, in a standard URI the app reads once. That secret is the whole security of the method, so the code should not be screenshotted and left in a photo roll; many services let you view it as text to type into a second device at the same time, which is the moment to register a backup app. The QR code generator shows what such URIs look like if you want to understand the format, and the hash generator is a way to see the one-way functions that the codes are built from, though neither is needed to use two-factor authentication.
What two-factor authentication does not do
- It does not protect a session that is already logged in. Malware on the device, or a stolen session cookie, bypasses the login entirely.
- It does not protect account recovery flows that fall back to email or security questions; check what the service does when "I lost my second factor".
- A non-phishing-resistant factor does not protect against a real-time phishing page that relays your code. For accounts that matter, that is the argument for passkeys.
Frequently asked questions
What is two-factor authentication?
Proving who you are with two different kinds of evidence instead of one. CISA sorts the kinds into something you know (a password), something you have (a phone, a security key) and something you are (a fingerprint). A password plus a code from your phone is two factors; two passwords are not.
Which second factor is the most secure?
A passkey or hardware security key using FIDO2 / WebAuthn. CISA calls FIDO and WebAuthn the only widely available phishing-resistant authentication, and NIST SP 800-63B says phishing resistance requires a cryptographic authenticator; app codes, push prompts, SMS and email do not qualify, because a code typed into a fake site works on the real one.
Is SMS two-factor authentication still worth using?
It is better than a password alone, which CISA states plainly: any MFA is better than no MFA. But NIST restricts out-of-band authentication over the phone network because SIM swaps and number porting can redirect the codes, and says email must not be used for it at all. Use SMS where it is the only option offered, and switch to an app or a passkey where you can.
What if I lose my phone?
That is what backup codes are for: NIST calls them look-up secrets, a list of one-time codes you keep somewhere safe and use once each. Save them when you enable the second factor, not after the phone is gone. Registering a second security key, or passkeys on more than one device, covers the same case without codes.
Do I still need a strong password with a second factor?
Yes. The second factor is a backstop, not a replacement, and some systems fall back to the password alone for account recovery. NIST's current rule for a password used by itself is at least 15 characters; the password generator makes one and the strength checker measures it.
Sources
- CISA: Multifactor authentication (the three factors; users with MFA are significantly less likely to be hacked; FIDO/WebAuthn as the only widely available phishing-resistant authentication; number matching; any MFA is better than no MFA)
- NIST SP 800-63B rev. 4: authenticator types, restricted status of PSTN (SMS and voice) out-of-band authentication, email not allowed for out-of-band, approval-only prompts no longer acceptable, phishing resistance requires cryptographic authenticators, and the 15-character rule for passwords used alone