How to Use Your iPhone’s Built-In Code Generator for 2FA

Iphone Code Generator Featured Image

Securing your online accounts is essential to protecting your personal information, especially if you re-use passwords. One way to add another layer of security to your accounts is to use two-factor authentication (2FA) with the iPhone code generator built into iOS.

Note: Websites that support the built-in 2FA iOS code generator will either provide you with a setup code or a QR code. Facebook offers both, but using a QR code is easier because you just need to scan it with your iPhone’s camera.

What Is the iOS Version Required to Use the iPhone Code Generator?

Your iPhone needs to run at least the iOS 15 to use the iPhone code generator. If you have an iPhone X or newer, you can update to and run iOS 15 to enjoy its features, including the built-in code generator for 2FA when logging in to websites or applications that support 2FA.

To check which iOS version you’re running, go to “Settings -> General -> iOS Version.”

You need to have iCloud activated to generate login codes for your online accounts. If you don’t have saved passwords in iCloud, you won’t have access to the built-in code generator on your iPhone.

Tip: if you want to store your passwords without using iCloud, check out these password managers for mobile, Web, and desktop.

How to Set Up the iPhone Code Generator

A website or app can either have a setup key or QR code (or both) you can scan to help you set up the iPhone code generator for better security. Follow this guide if the websites or apps you use support 2FA with your iPhone’s built-in code generator.

  1. On your iPhone, go to Settings.
  2. In the Settings screen, scroll down and tap “Passwords.”
Ios Settings
  1. Search for the saved password of a 2FA-enabled website or app.
  2. Tap on the saved login credentials.
Ios Settings Passwords
  1. Under “Account Options,” tap “Set Up Verification Code.”
Ios Settings Passwords Setup Verification Code
  1. Tap “Enter Setup Key” or “Scan QR Code.”
Ios Settings Passwords Key Or Qr
  1. Paste the setup key or scan the QR code you received from the website or app.
Ios Settings Passwords Paste Key
  1. You should see a code below your login information in “Settings → Passwords.”
Ios Settings Passwords Login Code

Tip: if you’re storing passwords on your iPhone, make sure to have the correct iPhone security settings to protect your information.

How to Get a 2FA Setup Key or QR Code

Every website or app has different ways of giving you a 2FA setup key. In this step-by-step guide, we are getting a 2FA setup key from Discord’s iOS app.

  1. Launch Discord on your iPhone.
  2. Tap on your profile on the bottom right of the screen.
Discord Profile Icon
  1. On the next screen, tap “Account.”
Discord Account
  1. In the Account screen, under “Two-Factor Authentication,” tap “Enable Two-Factor Auth.”
Discord Account Enable 2fa
  1. Enter your Discord account password.
Discord Account Enable 2fa Password
  1. When Discord tells you to download an authenticator app, tap “Next,” as you’ll use the iPhone code generator.
Discord 2fa Setup
  1. Tap “Copy” under the 2FA code, then tap “Next.”
Discord 2fa Code
  1. Paste the setup key in “Settings → Passwords → saved Discord login information.”
Ios Settings Passwords Paste Key
  1. Go back to Discord, then input the code generated by your iPhone.
Discord Enter 2fa Code
  1. You’re all set. Every time you need to log in to your Discord account, you’ll need to add the code generated in your iPhones settings.

Note: if the website or app supports scanning a QR code with your iPhone when setting up your device’s built-in code generator, simply scan the QR code with your device’s camera for a quicker setup process. You can also learn how to scan QR codes from an image on your smartphone.

Frequently Asked Questions

Which websites support setting up 2FA with my iPhone's built-in code generator?

You can use the 2FA Directory to look up and verify whether the websites or apps you use support 2FA. There are websites or apps that support specific authenticator apps, SMS or phone call authentication, and hardware authentication.

How do I remove the iPhone code generator from an account?

To remove the iPhone code generator from an account, first disable 2FA on that account. If you remove it from your iPhone’s settings first, you’ll get locked out of your account, and you’d need to use a backup or recovery code.

For example: you set up 2FA for your Discord account. Disable it there, then proceed to your “iPhone’s Settings → Passwords → saved login information → Edit → Delete Verification Code.”

Can I generate a backup code if I lose access to my iCloud account?

You can generate a series of backup codes or recovery codes from the platforms to gain access to your account if you lose your iPhone. Each code can only be used once, and it’s possible to generate a new set. If you also lose access to these backup and recovery codes, your last resort would be to contact the platforms running your account. You’ll need to prove account ownership to regain access to your account.

Image credit: Unsplash. All screenshots taken by Natalie dela Vega.

Is this post useful?
Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Natalie dela Vega

Natalie is a writer specializing in tech how-tos and gaming. When she's not writing, she plays PC games and travels. Here at MakeTechEasier, you will see her write about guides, tips, and solutions for Windows and iOS.