Find a course

Module 3: Securing Your AccountsLesson 7 of 1112 min

Two-Factor Authentication, Passkeys and Recovery

Compare SMS codes, authenticator apps, security keys and passkeys, defend against SIM swapping, and set up account recovery so you never get locked out.

Step 1 of 13Learn

When the password isn't enough

In 2022 and 2023, many people lost cryptocurrency, social media accounts and email to an attack that never needed their password guessed: SIM swapping. The attacker calls the victim's mobile carrier, pretends to be them, and convinces the agent to move the phone number to a new SIM card. Every text message, including login codes, now goes to the attacker.

The idea behind two-factor authentication (2FA), also called multi-factor authentication (MFA), is that logging in requires two different kinds of proof:

  • Something you know: a password or PIN.
  • Something you have: your phone, an authenticator app, a hardware security key.
  • Something you are: a fingerprint or face scan, usually used to open the device that holds the key.

A stolen password alone then isn't enough. 2FA blocks the vast majority of automated account takeover attempts, which is why it's the single most effective step after unique passwords.

But not all second factors are equal. A code sent by text message depends on your phone number staying in your hands, and as SIM swapping shows, that's not guaranteed. The stronger options don't rely on the phone network at all.

Step 2 of 13Diagram

Anatomy of a SIM swap

Anatomy of a SIM swapProcess diagram: Attacker gathers your details → Calls your carrier as you → Number moved to their SIM → Your SMS codes go to them → Passwords reset, accounts taken.Attacker gathersyour detailsCalls your carrier asyouNumber moved to theirSIMYour SMS codes go tothemPasswords reset,accounts taken

Tap a shape with to see more.

Attacker gathers your details

Name, address, birthday from breaches and social media.

Calls your carrier as you
Number moved to their SIM
Your SMS codes go to them
Passwords reset, accounts taken

Step 3 of 13Practice · Match the pairs

Match each login factor with its category.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. A 6-word passphrase
  2. A hardware security key on your keychain
  3. A fingerprint scan

Step 4 of 13Learn

Ranking second factors

From weakest to strongest:

  1. SMS or voice codes. Better than nothing, but vulnerable to SIM swapping and to phishing sites that ask you to type the code in real time.
  2. Authenticator apps. The app and the website share a secret during setup, and the app produces a new 6-digit code every 30 seconds without using the phone network. Immune to SIM swapping, but a convincing phishing page can still trick you into typing the code.
  3. Push approvals. The service sends a "Was this you?" prompt to your phone. Convenient, but attackers exploit MFA fatigue: they trigger dozens of prompts at 2 a.m. hoping you tap Approve to make them stop. Better versions make you type a number shown on the login screen.
  4. Security keys and passkeys. These use public-key cryptography tied to the real website's address. A fake site simply can't get a valid response, so they are phishing-resistant.

A passkey replaces the password entirely. Your device creates a key pair for each site: the site stores only the public key, and the private key stays on your phone, computer or password manager, opened with your fingerprint, face or PIN. There's no password to leak or reuse. Major platforms, banks and stores increasingly support passkeys; when a site offers one, it's usually the best choice.

Step 5 of 13Practice · Put in order

Order these login methods from weakest to strongest protection against phishing and account takeover.

Drag the items, or use the arrow buttons, to put them in order.

  1. Password plus SMS code
  2. Passkey or hardware security key
  3. Password plus authenticator app code
  4. Password only

Step 6 of 13Practice · Diagram

Climbing the login ladder

Which level is the only one that a perfect copy of the login page cannot fool?

Tap the shape that answers the question, then press Check.

Climbing the login ladderPyramid diagram: Password only, Password + SMS code, Password + authenticator app, Passkey or security key.Password onlyPassword + SMS codePassword +authenticator appPasskey or security key
Password only
Password + SMS code
Password + authenticator app
Passkey or security key

Tied to the real site's address, so a fake site gets nothing usable.

Step 7 of 13Practice · True or false

An authenticator app protects you against SIM swapping because its codes are generated on your phone and don't travel over the mobile network.

Step 8 of 13Practice · What would you do?

What would you do?

At 1:40 a.m., Aisha's phone shows a login approval request for her work email. She didn't try to log in. A minute later, another arrives, then five more.

Step 9 of 13Learn

Recovery: the forgotten back door

Strong locks are pointless if the back door is weak. Account recovery is how you get back in after losing your phone or forgetting a password, and attackers target it as well.

Set up recovery deliberately:

  • Save backup codes. Most services that offer 2FA give you a set of one-time recovery codes. Print them or store them in your password manager and keep a copy somewhere safe offline.
  • Register two second factors where possible, such as a passkey on your phone and one on your laptop, or two security keys, so losing one device isn't a crisis.
  • Check the recovery email and phone on your important accounts. An old university address or a number you no longer own is a hole someone else could use.
  • Treat security questions as passwords. "Mother's maiden name" and "first school" are often findable online. Give random, false answers and store them in your manager.
  • Add a carrier PIN or port-out lock with your mobile provider, which makes SIM swapping harder.

The worst time to discover that your recovery options are broken is the day your phone falls into a lake. Ten minutes of setup now prevents a week of locked-out stress.

Step 10 of 13Practice · Chart

Account takeovers blocked by each second factor

Against which kind of attack does an SMS code do worst?

Tap the bar that answers the question, then press Check.

Account takeovers blocked by each second factorBar chart with 3 categories: Automated bots: SMS code 100%, Phone prompt 100%, Security key 100%; Bulk phishing: SMS code 96%, Phone prompt 99%, Security key 100%; Targeted attacks: SMS code 76%, Phone prompt 90%, Security key 100%.0%20%40%60%80%100%Automated botsBulk phishingTargeted attacks100%100%100%96%99%100%76%90%100%
Google research with NYU and UC San Diego, 2019, on accounts with a recovery factor added.
Account takeovers blocked by each second factor
ItemSMS codePhone promptSecurity key
Automated bots100%100%100%
Bulk phishing96%99%100%
Targeted attacks76%90%100%

Step 11 of 13Note

Step 12 of 13Note

Step 13 of 13Practice · Select all that apply

Which recovery practices make an account safer? Select all that apply.

Select all that apply.