Two-factor authentication (2FA) means that signing in requires something besides your password: a code from an app, a confirmation on your phone or a physical key. Even if your password leaks or is guessed, nobody gets in without the second factor.

Types of second factor

MethodHow it worksProtection
SMS or voice callA code is sent to your phone numberBetter than nothing. Vulnerable to SIM swapping and interception
Authenticator app (TOTP)A 6-digit code that changes every 30 secondsGood. Independent of your carrier, but the code can be typed into a phishing site
Push approvalA “Is this you signing in?” notificationGood if you read the prompt carefully. Watch out for “push bombing”
Hardware security key (FIDO2 / U2F)A USB or NFC key you touch when signing inExcellent. Phishing-resistant: the key checks the site’s address
PasskeySign in with your fingerprint, face or device PINExcellent. Phishing-resistant, and no password at all

Why SMS is the weakest option

A criminal can talk your carrier into issuing a new SIM card or porting your number, and your codes go to them. SMS codes are also easy to extract over the phone: “please read me the code we just sent”. If a service offers another method, choose it — but SMS is still much better than no second factor.

Authenticator apps

An authenticator app stores a secret key and computes one-time codes using the TOTP standard. Google Authenticator, Microsoft Authenticator, Aegis, 2FAS and many password managers all work. When setting up:

Phishing and how to resist it

SMS and app codes don’t protect against fake websites: you type your password and code into a copy of the page, and the attacker immediately replays them on the real site. Hardware keys and passkeys cannot be fooled this way — the cryptographic signature is bound to the domain, so on a fake address the key simply doesn’t work.

What passkeys are

A passkey replaces the password using the FIDO2/WebAuthn standard. Your device creates a key pair: the private key stays with you (on your phone, computer or in a password manager) and the service stores only the public key. You confirm sign-in with a fingerprint, face or device PIN. A leak of the service’s database reveals nothing useful for logging in, and phishing doesn’t work.

Passkeys sync through iCloud, Google or your password manager, so you don’t lose them with your phone. If a service supports passkeys, turn them on.

Don’t lock yourself out: always add a backup method — a second key, backup codes or a second device — and store backup codes as carefully as passwords.

Where to start

  1. Your main email — it is used to recover every other account.
  2. Your password manager.
  3. Banks, payment services and government accounts.
  4. Work accounts, cloud services, hosting, your domain registrar, GitHub.
  5. Social networks and messengers.

Two-factor authentication doesn’t replace a good password — it complements it. See “How to create a strong password”.