# How to set up two-factor authentication on Gmail

> Turn on Gmail two-factor authentication under Security & sign-in, How you sign in to Google. Then add an authenticator app and print your 10 backup codes.

Source: https://mosaicbrowser.com/guides/set-up-two-factor-authentication-on-gmail

## How to set up two-factor authentication on Gmail

To set up two-factor authentication on Gmail, open your Google Account, click Security & sign-in, and under How you sign in to Google select Turn on 2-Step Verification, then follow the steps. Add a second method, such as an authenticator app or backup codes, before you need it.

![Two-step verification for Gmail, done once](https://mosaicbrowser.com/covers/set-up-two-factor-authentication-on-gmail.webp)

Gmail has no two-factor switch of its own. The setting is Google's 2-Step Verification, it lives in your Google Account, and it protects the whole account rather than Gmail alone. Turning it on takes a minute. Adding a second way in is the part people skip, and it is what gets you back in the week your phone is lost.

## How to set up two-factor authentication on Gmail

Google's steps ([Turn on 2-Step Verification](https://support.google.com/accounts/answer/185839?hl=en), read 27 November 2026):

1. Open your Google Account at myaccount.google.com. From Gmail, click your profile picture, then **Manage your Google Account**.
2. Click **Security & sign-in**.
3. Under "How you sign in to Google", select **Turn on 2-Step Verification**.
4. Follow the steps on screen.

If the account comes from work or school, Google warns these steps might not work, and says to contact your administrator if you cannot set it up.

From then on, signing in with a password needs a second step. Signing in with a passkey does not, because, in Google's words, a passkey "verifies that you have possession of your device".

## Choose your second steps

Google picks the challenge, not you. Its page says the one you get is "what Google thinks is best to help you sign in easily and keep out hijackers", so set up at least two methods, because the one it asks for may be the one you cannot reach that day. The methods are not equally strong.

| Method | How it works | Google's note |
| --- | --- | --- |
| Google prompts | a Yes / No notification on a signed-in Android phone, or an iPhone with Gmail, Google Photos, YouTube or the Google app | recommended; "can also help protect against SIM swap" |
| Passkey or security key | your device's screen lock, or a key you plug in | protects against phishing |
| Authenticator app | a one-time code made on your phone, even offline | can take up to 7 days to become available |
| Text message or call | a 6-digit code sent to your number | "can be vulnerable to phone number-based hacks" |
| Backup codes | 10 one-time 8-digit codes you print or download | for when nothing else works |

Phone numbers have a wait as well. Google may take up to 7 days to trust a number you add for 2-Step Verification, and it says why: if someone else added the number, that week is your time to lock them out. With a trusted passkey or security key already on the account, the wait may be shorter.

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: Logins and 2FA codes](https://mosaicbrowser.com/features/logins-and-2fa)

## Add an authenticator app

Google's instructions for Android are three lines. Go to your 2-Step Verification settings, tap **Set up authenticator** (some phones show **Get Started** first) and do what the screen says ([Get verification codes with Google Authenticator](https://support.google.com/accounts/answer/1066447?hl=en), read 27 November 2026). Any code app will do; the 2-Step Verification page asks for "Google Authenticator or another app that creates one-time verification codes". When a code fails, Google's checklist includes the phone's time. Since version 7.0 the app has no time correction setting and uses whatever time the operating system has.

With several Gmail accounts, rename each entry to the full Gmail address. Authenticator lets you change the username on a code (on Android, swipe left on it), and a list of five rows that all say "Google" is how a code from one account gets typed into another.

## Print your backup codes

Backup codes are what Google takes when the phone is lost, the number has changed or no code arrives ([Sign in with backup codes](https://support.google.com/accounts/answer/1187538?hl=en), read 27 November 2026):

1. In your Google Account, click **Security & sign-in**.
2. Under "How you sign in to Google", click **2-Step Verification**.
3. Under "Backup codes", click **Continue**, then **Get backup codes**.
4. Print or download them, and keep them somewhere other than your phone.

Each code works once. Refreshing makes a new set of 10 and deactivates the old ones. To sign in with one, choose **Try another way** at the second step, then **Enter one of your 8-digit backup codes**. A downloaded set is a text file named Backup-codes- followed by your username, which helps when you search for it a year later. An account in Google's Advanced Protection Program cannot download them.

### "Don't ask again on this computer"

At the second step Google offers a box to skip it on that device in future. Its advice is to tick it only on devices "you regularly use and don't share with anyone else".

## Two-factor codes for many accounts, in Mosaic

Mosaic can hold the key instead of your phone. Each Gmail account runs in its own profile, the key is saved in that profile, and its code shows only in that profile's browser:

1. Open the profile editor, go to the **Logins** tab and press **Add login**.
2. Fill in a label, the site and the Gmail address. A password is optional.
3. Open **Two-factor secret or notes** and paste the key into **Two-factor secret**: the base32 key with or without spaces, or the full `otpauth://` link. Mosaic refuses a key that could never make a code instead of saving it.
4. Start the profile. Its companion, inside that browser, shows the current code for this account and no other.

![The Mosaic companion inside a profile browser: notes, saved logins and two-factor codes for that profile](https://mosaicbrowser.com/shots/companion.png)
*The code for this account, in this account's profile*

A QR code picture won't work: Mosaic wants the key as text or as the `otpauth://` link. Google's setup screen may offer the key as text, and that is the moment to copy it. Mosaic encrypts passwords and two-factor secrets on disk along with the rest of the library, and the window never shows them. Turn on app lock and none of it decrypts without your password.

![Mosaic security settings: everything on disk sealed with AES-256-GCM, and an optional app lock](https://mosaicbrowser.com/shots/settings-security.png)
*App lock: nothing decrypts without your password*

Print the backup codes even so. They are Google's, not ours, and a code on paper works in any browser on any computer. Turned this on after a scare? Next, [see where you are logged in on Gmail](https://mosaicbrowser.com/guides/see-where-you-are-logged-in-on-gmail) and sign out whatever you don't recognise. The per-profile vault and the companion are described on [logins and 2FA](https://mosaicbrowser.com/features/logins-and-2fa); what to do when Google flags a sign-in is in [Gmail unusual sign-in activity](https://mosaicbrowser.com/guides/gmail-unusual-sign-in-activity).

## Sources

1. [Google Account Help: Turn on 2-Step Verification](https://support.google.com/accounts/answer/185839?hl=en), read November 27, 2026
2. [Google Account Help: Sign in with backup codes](https://support.google.com/accounts/answer/1187538?hl=en), read November 27, 2026
3. [Google Account Help: Get verification codes with Google Authenticator](https://support.google.com/accounts/answer/1066447?hl=en), read November 27, 2026

## Questions

### Is 2-Step Verification the same as two-factor authentication?

Yes. The first line of Google's help page reads "With 2-Step Verification, or two-factor authentication", so the two names mean one setting. After it is on, you sign in with your password and a second step, or with a passkey.

### Are text message codes safe enough for Gmail?

They are better than nothing, but Google's own page warns that codes sent by text or call can be vulnerable to phone number-based hacks. Google prompts, an authenticator app, a passkey or a security key are stronger.

### What if I lose my phone after turning on 2-Step Verification?

Use one of your backup codes, or another method you added. Google issues backup codes in sets of 10; each works once, and making a new set deactivates the old one.

### Why can't I choose Google Authenticator straight away?

Google says it can take up to 7 days for Authenticator to show up as a sign-in option, and the same for a new phone number. The delay lets you secure the account if someone else added it.

## Related

[Gmail unusual sign-in activity: what the alert means](https://mosaicbrowser.com/guides/gmail-unusual-sign-in-activity): Gmail flags a sign-in as unusual when the password is right but the device or location is new. Check its device, time and place, then answer Yes or No.

[How to see where you are logged in on Gmail](https://mosaicbrowser.com/guides/see-where-you-are-logged-in-on-gmail): Two Google pages show where you are logged in on Gmail: Manage all devices in your Google Account, and Gmail's Details link with the last 10 IP addresses.

[How to log out of Gmail on all devices](https://mosaicbrowser.com/guides/log-out-of-gmail-on-all-devices): Changing your Google password logs you out of Gmail on all devices except a few Google lists. To remove one device, sign it out from Manage all devices.

[How to keep Gmail accounts separate](https://mosaicbrowser.com/guides/keep-gmail-accounts-separate): Keep Gmail accounts separate: give each its own browser profile, recovery details and two-factor entry, and never chain them by forwarding.

[2FA codes per browser profile, with a login vault each](https://mosaicbrowser.com/features/logins-and-2fa): Mosaic keeps 2FA codes per browser profile: each profile has its own login vault with TOTP codes, shown with a countdown and typed with real keystrokes.







[How to create a second Facebook profile](https://mosaicbrowser.com/guides/create-a-second-facebook-profile): You can no longer create a second Facebook profile: Meta closed additional profiles to new ones. A Page is what you create instead, from your one account.

## Run this guide on your own accounts

Every Mosaic profile is a fingerprint, a proxy IP and a cookie jar that agree with each other, kept on your computer. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
