On this page
- What is two-factor authentication?
- Which two-factor method should you use?
- Is a passkey the same as two-factor authentication?
- Before you start: get an authenticator app
- How to set up two-factor authentication with an authenticator app
- How to turn on 2-Step Verification for your Google Account
- How to turn on two-factor authentication for your Apple Account
- Optional: security keys and a recovery key
- How to turn on two-step verification for your Microsoft account
- How to turn on two-factor authentication on Facebook and Instagram
- Which accounts should you protect first?
- How to avoid locking yourself out
- What to do when two-factor authentication isn't working
- Frequently asked questions
To set up two-factor authentication, open an account's security settings, find the option called "two-factor authentication", "2-Step Verification" or "two-step verification", and choose an authenticator app, a passkey or a security key rather than text messages. Then save the backup codes it gives you somewhere offline. Do your email account and your Apple, Google or Microsoft account first, because those can reset the passwords to almost everything else.
It's worth the few minutes per account. A 2023 Microsoft Research study of accounts flagged for suspicious activity found that two-factor sign-in cut the risk of compromise by 99.22%, and by 98.56% even when the password had already leaked.
What is two-factor authentication?
Two-factor authentication (2FA) means you prove who you are with two different kinds of evidence instead of one. The US Federal Trade Commission groups them as something you know (your password), something you have (your phone or a security key) and something you are (a fingerprint or your face). Someone who steals your password still can't get in without the second one.
Companies use different names for the same idea. Google calls it 2-Step Verification, Microsoft says two-step verification, Apple says two-factor authentication, and security agencies such as CISA say multifactor authentication, or MFA. You'll usually find it under Security, Sign-in or Password and security in an account's settings.
You usually see the second step only on a new device or browser. Most services let you mark a computer as trusted, which the FTC and Google say to do only on devices you don't share.
Which two-factor method should you use?
Not all second steps are equal. The big difference is whether the method can be phished: a fake login page can ask you for a code and pass it straight to the real site, but it can't fake a passkey or a security key.
| Method | How it works | Phishing-resistant? | Our take |
|---|---|---|---|
| Passkey | Your phone or computer signs you in after a face, fingerprint or PIN check | Yes | Best choice where a site offers it |
| Hardware security key | A USB or NFC key you plug in or tap, such as a YubiKey | Yes | Best for high-value accounts |
| Authenticator app | An app shows a new six-digit code every 30 seconds | No | The best all-round default |
| Push prompt | You tap Yes on a notification, such as a Google prompt | No | Good, and easy to use |
| Text message or call | A code is sent to your phone number | No | Better than nothing; replace it when you can |
| Email code | A code is sent to your inbox | No | Only if nothing else is offered |
The official guidance lines up behind that order:
- NIST, the US standards body, finalized its digital identity guidelines in July 2025 with SMS and voice codes as the only "restricted" method, which services must back up with an alternative and a warning about the risks. It also says app codes aren't phishing-resistant, because you type them in by hand.
- CISA, the US cybersecurity agency, told highly targeted people in December 2024 to stop using SMS as a second factor, partly because texts aren't encrypted, and kept that advice in its November 2025 update. It rates FIDO security keys most effective, passkeys an acceptable alternative, and authenticator apps fine for less valuable accounts.
- The FTC recommends an authenticator app or a security key over text or email codes, and warns that criminals can hijack your number with a SIM swap.
The research agrees. Google's 2019 study with New York University and UC San Diego found that an SMS code sent to a recovery phone blocked 76% of targeted attacks and an on-device prompt 90%, while no one using only security keys fell for targeted phishing. Microsoft's 2023 study found that apps such as Microsoft Authenticator beat SMS. Both found any second step far better than none, so if a site only offers text messages, turn them on anyway.
Is a passkey the same as two-factor authentication?
Close enough for most purposes. The FIDO Alliance, the industry group behind passkeys, describes them as using more than one factor: the device holding the passkey (something you have) and the face, fingerprint or PIN that unlocks it (something you are or know). Google's help pages say signing in with a passkey skips the second step, because it already confirms you control the device. If a service offers passkeys, set one up as well as, or instead of, a code.
Before you start: get an authenticator app
Authenticator apps use an open standard called TOTP (time-based one-time passwords), published by the IETF as RFC 6238 in 2011. When you set up an account, the site gives your app a secret key, usually inside a QR code. The app combines that key with the current time to make a new code every 30 seconds, and the site does the same sum to check it. It works with no signal at all.
Any of these will do the job:
- Google Authenticator (Android 6.0 or later, iPhone and iPad). Sign in with a Google Account and codes sync between devices, encrypted in transit and at rest, Google says. Use without an account keeps them on the phone only.
- Microsoft Authenticator (Android, iPhone). Besides Microsoft accounts, it makes codes for other sites. Turn on Cloud Backup in its settings on Android; on iPhone it backs up through iCloud.
- Apple's Passwords app (iOS 18 and later). It generates codes, autofills them on your Apple devices and backs them up through iCloud.
- Proton Authenticator (iPhone, Android, Mac, Windows, Linux). Free, open source and ad-free, with optional end-to-end encrypted sync through a Proton account.
- Ente Auth (iPhone, Android, web and desktop). Free and open source, with optional end-to-end encrypted backups.
- Aegis (Android only). Free and open source, with an encrypted vault and automatic backups.
Many password managers can generate these codes too, as CISA's guidance points out, which saves switching apps; our best password manager guide compares the main ones. If you're moving away from Google's apps, our guide on how to de-Google your life covers switching authenticators one account at a time.
Whichever app you pick, turn on its backup or sync before you add accounts. That one setting decides whether a lost phone is an annoyance or a lockout.
How to set up two-factor authentication with an authenticator app
These steps work on almost any website or app. The labels vary, but the flow is the same.
- Sign in on a computer if you can. It's easier to scan a QR code on a big screen with your phone.
- Open the account's security settings and find two-factor authentication (or two-step verification, or 2-Step Verification).
- Choose the authenticator app option. It may be called "authentication app", "authenticator" or "verification code app". You may have to confirm your password or a code sent by email first.
- Scan the QR code with your authenticator app (usually a + button). If you can't scan it, look for Can't scan? or Setup key on the site, and type that key into the app instead.
- Type the six-digit code your app now shows into the site to confirm. If it's rejected, wait for the next code and try again.
- Save the backup codes. Most services show a list of one-time recovery codes at this point. Print them or write them down (more on storing them below).
- Remove text messages as a fallback if the service lets you. CISA points out that adding an authenticator app doesn't automatically remove SMS, which leaves the weaker method open to attackers.
- Test it. Sign out, or open a private browser window, and sign in again with the new code before you rely on it.
How to turn on 2-Step Verification for your Google Account
- Go to myaccount.google.com and select Security & sign-in.
- Under How you sign in to Google, select Turn on 2-Step Verification.
- Follow the steps on screen. If you're signed in on a phone, Google can use its own prompts: a notification on an Android phone, or on an iPhone through the Gmail, Google Photos, YouTube or Google app, where you tap Yes to approve a sign-in. Google recommends these prompts as your second step if you don't sign in with a passkey.
- Add at least one more method. In your 2-Step Verification settings, tap Set up authenticator for an authenticator app (some devices show Get Started instead). For a passkey or security key, go back to How you sign in to Google and select Passkeys and security keys.
- Under Backup codes, select Continue, then Get backup codes. You get 10 codes of eight digits, each usable once. Refresh makes a new set and cancels the old one.
Google's help pages add that a newly added phone number can take up to seven days to be trusted, and that creating a passkey switches you to passkey-first sign-in, which you can change. Work and school accounts are run by an administrator, so these steps may not work there. If you're at high risk of targeted attacks, CISA suggests enrolling in Google's Advanced Protection Program for stronger defenses against phishing and account hijacking.
How to turn on two-factor authentication for your Apple Account
Most Apple Accounts already have two-factor authentication. Apple says an account that was created with it can't have it removed, and if you turn it on yourself, you have two weeks to go back. To check or turn it on:
- iPhone or iPad: open Settings, tap your name, tap Sign-In & Security, then turn on Two-Factor Authentication and follow the steps.
- Mac: open System Settings, click your name, click Sign-In & Security, and turn it on.
- Web: sign in at account.apple.com and select Upgrade Account Security.
Once it's on, signing in on a new device or the web needs your password plus a six-digit code that appears on your other Apple devices (tap Allow to see it) or arrives on your trusted phone number. If no code shows up, tap Didn't Get a Code? on the sign-in screen to have it sent by text or call. On an iPhone that filters texts from unknown senders, check Settings > Apps > Messages > Unknown Senders, because Apple's message may be sitting there.
Optional: security keys and a recovery key
Security keys replace codes entirely, so only a physical key or one of your Apple devices can approve a new sign-in. You need at least two FIDO Certified keys (up to six), and every device signed in to your account must run iOS 16.3, iPadOS 16.3, macOS Ventura 13.2 or later. Add them under Settings > [your name] > Sign-In & Security > Two-Factor Authentication > Security Keys > Add Security Keys. Child accounts and Managed Apple Accounts can't use them.
A recovery key is a 28-character code you create under Sign-In & Security > Recovery Key. It replaces Apple's standard account recovery, so you'd need the key plus your trusted phone number to get back in.
How to turn on two-step verification for your Microsoft account
- Sign in at account.microsoft.com/security.
- Select Manage how I sign in.
- Under Additional security, find Two-step verification and choose Turn on.
- Follow the steps. If you use Microsoft Authenticator, you'll scan a QR code to prove you have the phone.
With two-step verification on, you always need two forms of identification, so a forgotten password means you need two working contact methods. Microsoft strongly recommends keeping three pieces of security info (email addresses, phone numbers or an authenticator app) and suggests two different email addresses. If you lose your contact methods, it says getting back in can take 30 days, and you may lose the account.
Some older apps and devices, such as the Xbox 360, can't use regular security codes. If one rejects your correct password after you turn this on, create an app password under App passwords on the Additional security page.
Microsoft also says it's starting to phase out text message codes for sign-in and recovery on personal accounts, calling SMS a leading source of fraud, though it hasn't set a cutoff date. It will prompt you to create a passkey and add a verified email address instead, so do that now rather than relying on your phone number.
How to turn on two-factor authentication on Facebook and Instagram
Meta handles two-factor authentication for both apps in Accounts Center. If your Facebook and Instagram accounts are linked there, you pick which one to protect from the same list. Meta says it's gradually moving people to Meta Accounts, so you may see Meta Account settings where these steps say Accounts Center.
- Open Accounts Center.
- Facebook app: tap Menu, scroll down and tap Settings & privacy, then Settings, then Accounts Center. On a computer, click your profile picture in the top right, then Settings and privacy > Settings > Accounts Center.
- Instagram app: tap your profile picture in the bottom right, tap Menu in the top right, then Accounts Center. On a computer, click More in the bottom left, then Settings, then See more in Accounts Center.
- Tap Password and security, then Two-factor authentication, and pick the account. You may be asked for your password.
- Choose a method and follow the steps. Facebook offers a security key, an authentication app or text message codes. Instagram offers an authentication app (the one it recommends), text messages, or WhatsApp codes once text messages are on. On Instagram, the authentication app option can only be turned on in the Android or iPhone app.
- Save the recovery codes. Facebook gives you 10 recovery codes for when you can't use your phone, and Instagram's backup codes do the same job.
Both apps offer to remember the browser or device you're using so you don't need a code next time. Meta's help pages say to skip that on a public or shared computer.
Which accounts should you protect first?
Work through them in this order:
- Your main email account. Whoever controls it can reset most of your other passwords.
- Your Apple, Google or Microsoft account. These hold your backups, photos and often your saved passwords.
- Your password manager, if you use one.
- Banks, cards, payment apps and tax accounts. The FTC says to start with your most sensitive accounts, naming your bank, credit cards and email, then social media, tax filing and payment apps.
- Your mobile carrier. CISA suggests adding a carrier PIN and two-factor sign-in to reduce the risk of a SIM swap.
- Social media, shopping, gaming and streaming accounts, which CISA also lists as worth protecting.
If a service you care about has no two-factor option, CISA suggests asking the company to add it.
How to avoid locking yourself out
Two-factor authentication keeps people out, and that includes you if you skip the backups. Before you switch phones or reset anything:
- Keep backup codes offline. Google suggests storing them with your passport or other important papers.
- Add a second method. A second security key, a backup phone number or an authenticator on a second device all count.
- Move your authenticator before you wipe the old phone. With Google Authenticator, codes synced to your Google Account appear when you sign in on the new phone. Unsynced codes move with Transfer codes > Export codes on the old phone and Transfer codes > Import codes on the new one. Microsoft Authenticator backups only restore to the same kind of phone, so an iPhone backup won't restore on Android, and Microsoft says that from January 2027 Android backups will run through Google One backup instead of your Microsoft account.
- Keep recovery details current. An old phone number or a dead email address is useless when you need it.
If you do get locked out, recovery is slow on purpose. Apple says account recovery might take several days or longer and that contacting Apple Support can't shorten the wait, and Microsoft says getting back into an account can take 30 days.
What to do when two-factor authentication isn't working
The code is always rejected. Authenticator codes depend on the clock, so set your phone's date and time to update automatically. Google Authenticator dropped its own time correction setting in version 7.0 and now uses the phone's clock. Also check that you're reading the code for the right account and typing it before it changes.
The text message never arrives. Ask for a call instead, or use a backup code or another method. On iPhone, check the Unknown Senders filter mentioned above.
An old app keeps saying your password is wrong. It probably can't handle the second step. For Microsoft accounts, create an app password for it.
Frequently asked questions
Is two-factor authentication worth it?
Yes. A 2023 Microsoft Research study found it cut the risk of account compromise by 99.22%, and by 98.56% for accounts whose passwords had already leaked.
Is SMS two-factor authentication safe?
It's much safer than a password alone, but it's the weakest common option: codes can be phished or redirected by a SIM swap. NIST restricts SMS and CISA tells high-risk users to avoid it, so switch to an app, passkey or security key when you can.
What happens if I lose the phone with my authenticator app?
If your app backs up or syncs codes, sign in to it on a new phone and they come back. If it doesn't, use your saved backup codes or another method to get into each account, then set up two-factor authentication again.
Is two-step verification the same as two-factor authentication?
For everyday use, yes. Google and Microsoft say two-step verification, Apple says two-factor authentication, and security agencies say multifactor authentication, but all of them mean a second check on top of your password.
Should I store two-factor codes in my password manager?
It's convenient and fine for most accounts, as long as the password manager itself has a strong master password and its own two-factor sign-in. For your most important accounts, a separate authenticator app or a security key keeps the two factors apart.
Sources
- How effective is multifactor authentication at deterring cyberattacks?, Microsoft Research
- How effective is multifactor authentication at deterring cyberattacks?, arXiv
- New research: How effective is basic account hygiene at preventing hijacking, Google Security Blog
- Use two-factor authentication to protect your accounts, Federal Trade Commission
- More than a password, CISA
- Mobile communications best practice guidance, CISA
- Authenticator and verifier requirements, NIST SP 800-63B-4
- RFC 6238: TOTP, Time-Based One-Time Password Algorithm, IETF
- Passkeys, FIDO Alliance
- SP 800-63-4, Digital Identity Guidelines, NIST
- Turn on 2-Step Verification, Google Account Help
- Sign in with a passkey instead of a password, Google Account Help
- Sign in with backup codes, Google Account Help
- Get verification codes with Google Authenticator, Google Account Help
- Use a security key for 2-Step Verification, Google Account Help
- Two-factor authentication for Apple Account, Apple Support
- Get a verification code and sign in with two-factor authentication, Apple Support
- About security keys for Apple Account, Apple Support
- How to generate a recovery key, Apple Support
- What to expect during account recovery, Apple Support
- Apple security releases, Apple Support
- How to generate verification codes in the Passwords app, MacRumors
- How to use two-step verification with your Microsoft account, Microsoft Support
- Microsoft to stop sending SMS codes for personal accounts, Microsoft Support
- Microsoft is killing SMS codes for Microsoft account sign-in, Windows Latest
- Microsoft making passkeys the default and phasing out SMS authentication, Privacy Guides
- Back up your accounts in Microsoft Authenticator, Microsoft Support
- Proton Authenticator, Proton
- Ente Auth, Ente
- Aegis Authenticator, Aegis
- How two-factor authentication works on Facebook, Facebook Help Center
- Securing your Meta Account with two-factor authentication, Instagram Help Center
- Mobile communications best practice guidance, version 2.0 (PDF), CISA
Was this helpful?
Thanks, noted. It helps decide what gets updated first.


