How to set up two-factor authentication without locking yourself out
Two-factor authentication stops someone who has your password from getting into your account. Setting it up takes a few minutes; setting it up so you can still get in when your phone is lost takes a few more. Here's how to do both.
Video ·
How to Set Up Two-Factor Authentication Without Locking Yourself Out
Choosing a method, saving your recovery codes, and testing both ways in.
What it does
With two-factor authentication (also called 2FA, two-step verification or multi-factor authentication), signing in needs your password and a second thing: a code from an app, a security key, a passkey, or a text message. A leaked or guessed password alone is no longer enough. It's worth turning on everywhere it's offered, and above all for your email, which can reset every other account.
1. Choose a method
Not all second factors protect you equally. From strongest to weakest:
- A security key or a passkey (both use the FIDO standard). These are phishing-resistant: they check which website is asking and won't answer a lookalike site, so there's no code for a scammer to trick out of you. See passkeys explained.
- An authenticator app that shows a six-digit code that changes every 30 seconds. Much stronger than a password alone, and a good default.
- A push notification asking you to approve the sign-in. Never approve one you didn't start; if the app asks you to type a number shown on the sign-in screen, that guards against approving by mistake.
- A code by text message (SMS). The weakest option, because messages can be intercepted or your number moved to another SIM, but still far better than no second factor.
Codes from an app or a text message protect you if your password leaks, but they can still be phished: a fake sign-in page can ask for the code and use it straight away. Only type a code into a site you reached yourself, never one you got to from a link in a message.
2. Set up an authenticator app
- Install an authenticator app, or use the one built into your password manager if it has one.
- In the account's security settings, look for two-factor authentication, two-step verification or a similar name, and choose the authenticator app option.
- Scan the QR code it shows with the app. (If you can't scan, most sites also show a setup key you can type in.)
- Type the code the app now shows back into the site. This confirms the app was set up correctly; until you do, two-factor isn't on.
Every site lays this out a little differently, and the names vary, but the steps are almost always these.
3. Save your recovery options before you leave the page
This is the step that stops you locking yourself out. If your phone is lost, broken or reset, the app's codes go with it unless you've planned for that.
- Backup codes. Most sites offer a set of one-time recovery codes when you turn on two-factor. Save them in your password manager, or print them and keep them somewhere safe. Each one usually works only once.
- A second method. Add a second security key, a passkey, or a second device if the site allows it, so losing one doesn't lock you out.
- An up-to-date recovery email and phone number, in case you need the site's own account recovery.
Recovery procedures differ a lot from site to site. Some can take days, ask for ID, or aren't possible at all without a backup code, so don't count on getting back in without one.
4. Test it, both ways
- Sign out, then sign back in with your password and the authenticator app.
- Check your backup works too: sign in using your second method, or confirm you can find your backup codes. (If you use a backup code to test, remember that code is now spent.)
Testing now, while you still have access, is far easier than finding a problem later when you don't.
Where to start
- Your email account, because it can reset almost everything else.
- Your password manager.
- Banking and payments, then your phone carrier account and social media.
If a site you use has just been breached, turn it on there first, as part of what to do after a data breach.
When you change phones
Move your authenticator codes to the new phone (many apps have a transfer or backup option), then sign in to a few accounts with the new phone before you wipe or hand in the old one. If an account still asks for the old phone, sign in with it and switch the account over.
Sources
- CISA: More than a password (the US Cybersecurity and Infrastructure Security Agency, on multi-factor authentication)
- NIST SP 800-63B-4: Authentication and Authenticator Management, section 3.2.5 on phishing resistance
- FIDO Alliance: Passkeys