How to Set Up Two-Factor Authentication on Your Phone: Android and iPhone Steps That Work
Even a strong password is not enough on its own. If it leaks in a data breach, anyone who has it can sign in as you. Two-factor authentication (2FA) adds a second check: after your password, you enter a six-digit code that only your phone can generate. It takes a few minutes to set up, and it is one of the best things you can do for your accounts. Here is how to set up two-factor authentication on your phone on Android and iPhone, using an authenticator app.
1. Why an authenticator app beats SMS codes
An authenticator app generates a new six-digit code every 30 seconds, and the codes work even when you have no signal, because they are generated on your phone. A text-message code is better than no second factor at all, but it is the weaker option: SMS codes can be intercepted, and a stolen number can be moved to another SIM. So whenever a service offers a choice, choose Authenticator app instead of SMS. You will still sign in with your password first — the code is the second factor, not a replacement for the password.
2. Pick one authenticator app and stick with it
You only need one app, and all the main ones are free on Android and iPhone. Google Authenticator is simple and works with almost any account; sign in with your Google account in the app to turn on cloud sync, so your codes are not stranded on one phone. Microsoft Authenticator works the same way and can back up your accounts to iCloud or Google Drive — but only if you switch backup on before you need it. On iPhone, you may not need a separate app at all: Apple has a built-in authenticator (see section 4), available from iOS 15, in the Passwords app on iOS 18 and later. Pick one, install it, and use it for every account — scattering codes across three apps is how people lose them.
3. Turn on two-factor authentication on your phone and scan the QR code
The setup is almost identical for every account, and once you have done it once, the rest take about two minutes each. Do it on a computer if you can, so your phone camera is free to scan the code.
- Install your authenticator app and open it.
- On your computer or phone browser, sign in to the account and go to its Security settings, then find Two-factor authentication or 2-Step Verification and turn it on.
- Choose Authenticator app as the method. The site shows a QR code on screen.
- In the authenticator app, tap the add (+) button, choose Scan QR code, and point your phone camera at the code. The account appears in the app with a six-digit code.
- Type the code showing in the app back into the website and confirm. If the site offers a setup key instead of a QR code, you can type that key into the app manually.
For a Google account, the path is myaccount.google.com, then Security, then 2-Step Verification, then Authenticator app. For a Microsoft account, it is account.microsoft.com/security, then Advanced security options, then Add a new way to sign in or verify, then Use an app. Menu names can change with redesigns, so if a label looks different, look for Security, then a two-step or two-factor option — that is where it lives.
4. On iPhone, use the built-in authenticator in the Passwords app
Apple’s built-in authenticator generates the same six-digit codes and fills them in automatically when you sign in, with no extra app. On iPhone, open the Passwords app, tap All, then tap the account for the website. Tap Set Up Verification Code (or Edit, then Set Up Code), then Scan QR Code and point the camera at the QR code on the other device’s screen. If you cannot scan — for example, the setup page is on the same phone — choose Enter Setup Key instead and paste the key shown under the QR code. A verification code then appears in the account entry, and when you sign in later, tap the code suggested above the keyboard, or open the Passwords app and copy it. The codes are backed up through iCloud, so they follow you to your other Apple devices signed in with the same Apple ID.
5. Save your backup codes before you need them
This is the step most people skip, and it is the one that saves you. When you turn on 2FA, most services offer backup or recovery codes — usually a list of one-time codes, sometimes a single recovery code. Save them somewhere safe and separate from your phone, such as printed on paper kept at home, or in a password manager. Do not store them only as a screenshot on the same phone, because that is the device you will lose. Also add a recovery option where the service offers one, such as a backup phone number or a second email you control. And if your authenticator app offers cloud backup, turn it on now — Google Authenticator’s sync and Microsoft Authenticator’s backup only help if they were enabled before the phone was lost.
6. What to do if a code does not work, or you lose your phone
First, do not panic, and never share a code with anyone — no genuine support team will ask for one. If a code is rejected, wait for the next one: each code lasts only 30 seconds, so a code that was about to expire may have timed out while you typed it. Check that your phone is set to automatic date and time, because the codes are time-based and a wrong clock makes them fail. In Google Authenticator, you can also use Settings, then Time correction for codes, then Sync now. If you have lost the phone, sign in on a trusted device you are already signed in on, use one of your saved backup codes, or use the account’s recovery process with your backup email or phone. That is slower by design, which is exactly why the backup codes in section 5 matter.
Setting up two-factor authentication on your phone is a small chore with an outsized payoff: a leaked password on its own no longer opens your email, your bank or your social accounts. Start with the three accounts that matter most — your email, your bank and your main social account — then add the rest one at a time. For more ways to lock down your phone, see our guide to the privacy and security settings to change today, and our passkeys guide explains the next step beyond codes. And once your accounts are protected, make sure your phone itself is backed up, so a lost phone does not mean lost photos either.
Sources
- Apple Support — Automatically fill in one-time verification codes on iPhone: https://support.apple.com/en-gb/guide/iphone/ipha6173c19f/ios
- Techsplurge — Two-Factor Authentication, Properly Set Up: https://techsplurge.com/software-and-apps/two-factor-authentication-properly-set-up/
