To add a 2FA account by QR code, open your authenticator, choose the option to add an account by scanning, allow camera access, and point the camera at the QR code the service shows during setup. Then type the first code your authenticator generates back into the service to prove the link works. It takes about a minute and avoids typing mistakes.
This guide walks through the full process, explains what the QR code contains, and fixes the problems people hit most often.
Before you start
You need three things:
- An account that supports authenticator apps. Look for "authenticator app", "two-step verification" or "TOTP" in the account's security settings.
- Two screens, or a screen and a camera. The QR code appears on one screen, and the camera scans it from the other.
- Somewhere to save recovery codes. Many services show one-time recovery codes during setup. Save them first. See secure backups.
Step-by-step: adding the account
- Sign in to the service and open its security settings. For a worked example, see how to enable 2FA on Google.
- Choose the authenticator app option. The service displays a QR code and often a text "setup key" or "secret key" beside it.
- Open your authenticator and choose the add-by-QR option. When the browser asks, allow camera access.
- Aim the camera at the QR code. Keep it steady and fill the frame without cutting off the edges. The scan usually completes in a moment.
- Review the details. The authenticator reads the issuer, account name and secret. Check that they look right and edit the label if you want a clearer name.
- Save the account. A six-digit (or eight-digit) code appears and starts refreshing.
- Confirm with the service. Type the current code into the service's verification box before it expires. If it accepts it, setup is done.
- Save the recovery codes and make a backup of your authenticator. See how to back up 2FA codes securely.
What the QR code contains
The QR code is just a way to carry a short text address, in the otpauth format documented in the Google Authenticator key URI format. It looks like this, with the secret shortened:
otpauth://totp/Example:you@example.com?secret=JBSWY3DPEHPK3PXP&issuer=Example
It carries the type (time-based or counter-based), a label with the account name, the Base32 secret, the issuer, and optional settings: algorithm (SHA1, SHA256 or SHA512), digits (6 or 8) and period (30 seconds by default). Scanning transfers all of this at once, which is why it is more reliable than typing. You can read more in what is an otpauth:// QR code.
Because the QR code contains the secret, treat it like a password: do not photograph it casually, do not share it, and do not leave the setup page open on a shared screen.
Safety checks before you scan
- Scan only a code you triggered. The QR should appear after you signed in yourself and chose to enable 2FA. A QR code sent by email, chat or a stranger is not a legitimate setup.
- Check the address bar of the setup page before you scan.
- Do not scan in public view. Someone behind you could photograph the code and later generate your codes.
- Keep a screenshot out of cloud galleries. A screenshot of the QR code is a copy of your secret. Delete it after setup.
Troubleshooting: when the scan fails
| Problem | Likely cause | Fix |
|---|---|---|
| Camera does not start | Permission blocked | Allow the camera for the site in your browser settings, then reload |
| Nothing is detected | Glare, blur or tiny code | Raise brightness, enlarge the code on screen, hold steady, move closer |
| Code detected but account is wrong | Scanned an old or different QR | Generate a fresh QR on the service and scan again |
| Code is accepted but then rejected at sign-in | Device clock is wrong | Set date and time to automatic |
| QR and scanner on the same device | You cannot point a camera at your own screen | Use the setup key and manual entry, or the QR code reader if you can save the QR image |
If a service gives you only a QR image and your camera will not cooperate, the text setup key beside it is equivalent. The manual entry guide covers that.
A note on clocks
Time-based codes depend on the current time. If your device clock is off, the code can be correct in form but wrong in time, and the service will reject it. RFC 6238 describes servers tolerating only a small drift. Turn on automatic date and time on your device.
After setup
Keep these habits:
- Label accounts clearly. If you have two accounts at one service, the label lets you tell them apart.
- Test your recovery. Make sure you can regain access if you lose the device, by saving recovery codes and exporting an encrypted backup.
- Add the next account. Start with email, then financial and social accounts.
About 2Fa Live
2Fa Live is a free browser authenticator. Your secrets are encrypted in your browser with your passphrase and are not sent to a server. You can try the flow with the TOTP generator, or read a QR code with the QR code reader.
Key takeaways
- Scanning is the fastest and least error-prone way to add an account.
- Scan only a QR code you triggered yourself, and treat it like a password.
- If the scan fails, fix the camera, brightness or size, or use the setup key.
- Always confirm with a live code, then save recovery codes and a backup.
Tags: qr code, guide, add account, setup, authenticator