Two-factor authentication (2FA) is a way of signing in that asks for two different kinds of proof instead of one. You still type your password, but you also provide something a thief is unlikely to have, such as a short-lived code from an app or a tap on a security key. If someone steals or guesses your password, they still cannot get in.
That one extra step is the most practical security upgrade most people can make in an afternoon. This guide explains how 2FA works, how the common methods compare, what it does not protect against, and how to set it up.
How two-factor authentication works
Every sign-in is a claim: "I am the owner of this account." Passwords are a weak way to back that claim up because they can be guessed, reused across sites, leaked in a data breach, or captured by a fake login page. 2FA adds a second, independent check.
In practice the flow looks like this:
- You enter your username and password.
- The service asks for a second proof.
- You provide it, for example a six-digit code from an authenticator app.
- The service lets you in only if both checks pass.
The second proof is independent of the password. Changing nothing about how strong your password is, it means an attacker now has to beat two different defences at once.
The three kinds of factors
Authentication guidance such as NIST SP 800-63B groups proofs into categories. Real two-factor authentication combines two different ones.
| Factor | What it is | Examples |
|---|---|---|
| Something you know | A secret in your memory | Password, PIN |
| Something you have | An object only you hold | Phone with an authenticator app, hardware security key |
| Something you are | A physical trait | Fingerprint, face unlock on your device |
Two passwords are not two factors, because both are "something you know". A password plus a code generated on your phone is, because the second proof comes from a device you hold.
Common 2FA methods compared
| Method | How it works | Strengths | Weaknesses |
|---|---|---|---|
| SMS code | A code is texted to your number | Easy, no app needed | Can be intercepted or redirected, for example through SIM swapping |
| Authenticator app (TOTP) | An app generates a new code every 30 seconds from a shared secret | Works offline, no phone signal needed | You must back up the secret; codes can be typed into a fake site |
| Push approval | You tap "approve" on a notification | Fast | Prompt fatigue; can be approved by mistake |
| Hardware security key | A physical device signs a challenge | Resists phishing | Costs money; you need a spare |
| Passkey | A cryptographic key stored on your device unlocked by biometrics or PIN | Resists phishing, no code to type | Not yet offered everywhere |
The OWASP Multifactor Authentication Cheat Sheet describes SMS as a restricted option because of SIM-swap and interception risks, and recommends phishing-resistant methods such as FIDO2/WebAuthn and passkeys where possible. Time-based codes from an app sit in the middle: much better than SMS, but still something a convincing fake site can try to collect. For a deeper comparison, read SMS 2FA vs authenticator apps.
Why 2FA works
Most account takeovers start with a password that is already in an attacker's hands. Passwords leak in breaches, get reused, or are typed into look-alike sites. Without 2FA, that is the end of the story. With 2FA, the attacker holds only half of what the service demands.
The effect is strongest against the most common, least targeted attacks: automated attempts that try leaked passwords against many sites. Those attackers usually do not have your phone.
What 2FA does not protect against
Being honest about limits makes you safer:
- Real-time phishing. A fake site can ask for your password and your current code, then immediately pass both to the real site. Codes you type by hand are not phishing-resistant. NIST's guidance says manually entered one-time codes do not qualify as phishing-resistant, which is why passkeys and security keys are rated higher.
- Weak account recovery. If an attacker can talk their way past a help desk or reset via a compromised email address, 2FA does not matter.
- Malware on your device. If your phone or computer is compromised, anything on it can be at risk.
- A lost second factor with no backup. This one hurts honest users: lose your phone with no backup codes and you can be locked out. See how to recover 2FA accounts.
How to start in ten minutes
- Start with email. Your email account can reset almost everything else, so secure it first. Guides such as enabling 2FA on Google walk through the steps.
- Then protect financial and social accounts. Banking, payment, crypto exchange and social media accounts are the usual targets, for example Instagram.
- Choose the strongest method offered. Passkey or security key first, authenticator app second, SMS only if nothing else is available.
- Save the backup codes. Services usually show one-time recovery codes during setup. Store them somewhere safe and offline.
- Back up the authenticator itself. If the codes live only on one device, losing it is a problem. Read why secure backups matter.
Where 2Fa Live fits
2Fa Live is a free, browser-based authenticator that generates standard time-based (TOTP) and counter-based (HOTP) codes. You add an account by scanning the QR code a service shows you, or by typing the secret key. Your account secrets are encrypted in your browser with a passphrase you choose and are never sent to a server. You can try the TOTP generator or read how the privacy model works.
Whatever authenticator you choose, the principle is the same: a password alone is not enough, and a second factor you control closes the biggest gap.
Key takeaways
- 2FA asks for two different kinds of proof, so a stolen password alone is not enough.
- Passkeys and hardware keys are the strongest everyday options; authenticator apps are a strong, widely supported default; SMS is better than nothing but weaker.
- 2FA is not magic. Check web addresses, keep passwords unique, and plan for recovery.
- Always save backup codes when a service offers them.
Tags: 2fa, two-factor authentication, basics, authenticator app