Skip to content

Setting Up an Authenticator App Step by Step

How to scan the QR code, keep the setup secret, enter the first code and confirm an authenticator app works before you rely on it.

Reviewed on 26 November 2026

An authenticator app is a phone app that makes short, changing codes for a login. Setting one up means linking the app to your account once, by scanning a picture on the screen. After that the app makes the codes by itself, and it doesn't need an internet connection or mobile service.1

Screens differ from site to site. Follow each provider's own help page for your account. This page shows the general order, using Cloudflare's documentation as one example. Expect small changes.

What you're linking

The picture on the screen is a QR code, a square pattern a camera can read. Inside it sits a web-style address that must contain a label and a secret.2 The label names the account. The secret is the private value the app uses to work out each code.

Many smartphones can scan such a code and enrol it in an authenticator app.2 The app and the site now share the secret. The risk is spelled out by Wikipedia: an attacker with access to the shared secret could generate new, valid codes at will.2

So treat the QR code and any typed-out version of the secret like a password. Don't post it. Don't send it to anyone. A screenshot counts too.

The setup in orderOpen the site's security settingsScan the QR code with the appType the first code to confirmSave backup codesTest a fresh sign-in
Don't close the setup page until the last step is done.

The steps

  1. Check the account first. Cloudflare's documentation says 2FA can only be enabled on an account with a verified email address, or you may lock yourself out.3 Read your own provider's page for any such condition.
  2. Open the security settings. Look under profile, account or security for a heading such as two-factor or two-step sign-in. Google's own steps begin in the Google Account, under Security & sign-in.1
  3. Choose the app option. Cloudflare's page calls it Mobile App Authentication, and says to scan the QR code with your mobile device and enter the code from your authenticator application.3
  4. Scan the code. Hold the phone's camera or the app's scan button over the square. If your site offers a "can't scan" link, Cloudflare says there are alternative steps to configure your authenticator application manually.3 That route shows the secret as typed text, so keep it private.
  5. Type the first code. The site asks for one code to prove the link works. Codes last only a short time. Cloudflare says about 30 to 60 seconds before a new one is generated.3 Wikipedia notes the usual default period is 30 seconds.2 If a code is rejected, wait for the next one and try again.
  6. Save the backup codes. Do this before you close the page. Cloudflare says to generate and save your recovery codes, to avoid being locked out.3 The backup codes page explains how.
  7. Test it. Sign out, then sign in again with the password and a fresh code. Doing this while you still have a signed-in session open keeps you from being stuck if something went wrong.

Rules for the codes themselves

Google's help page has a firm line on codes: a code is for your own sign-in screen only.1 The same page says you won't receive a call from Google to verify a code.1 That holds for any site. Type a code only on the sign-in screen you opened yourself.

If you change phones

Cloudflare says you may need to reconfigure your mobile application authentication if you lose access to your mobile device.3 When you reconfigure it, the previous TOTP codes are invalid, but reconfiguring does not turn 2FA off.3 Cloudflare also points to Google's documentation on transferring Google Authenticator codes from one Android device to another.3 Check your own provider's and app's guidance. As general advice, keep the old phone working until the new one is confirmed.

A note on trusted devices

Some sites offer a "don't ask again on this computer" box. Google says to tick it only on devices you regularly use and don't share with anyone else.1

Reference list

  1. Turn on 2-Step Verification, Google Account Help
  2. Time-based one-time password, Wikipedia
  3. Two-factor authentication, Cloudflare Fundamentals docs