How to Set Up and Use the Built-in 2FA Code Generator in iOS - MacRumors
Skip to Content

How to Set Up and Use the Built-in 2FA Code Generator in iOS

by

With online account hacking becoming increasingly widespread, all users should make sure they're taking every security measure available to them. If you use Apple devices, consider using Apple verification codes to protect your accounts. Keep reading to learn how it works.

iPhone Security Feature 1
One of the best ways to protect any online account is by using two-factor authentication (2FA). 2FA offers hardened security during login attempts by requesting that the user provides an extra piece of information only they would know, such as a randomly generated code from a third-party.

In iOS 15, iPadOS 15, macOS Monterey, and later versions of its operating system software, Apple includes a built-in two-factor authenticator that lets iOS devices be used to generate verification codes for additional sign-in security.

This means if a site offers 2FA, you can set up verification codes for it without downloading a third-party app. Verification codes are backed up via iCloud, and once set up, the codes will autofill when you sign into the site using any Apple device linked to your Apple ID. This makes using 2FA on iPhone and iPad much more streamlined.

Enable 2FA on the Account or Service

Here we'll explain how to set up and use verification codes on iPhone and ‌iPad‌. You'll first need to enable the use of a 2FA app on whichever website or service you are trying to secure. (It's easier to complete this initial step on a desktop computer, as it may well involve scanning a QR code displayed on the screen using your iPhone or ‌iPad‌'s camera.)

twitter 2fa
Some sites have text message 2FA enabled by default, so you'll likely need to explore the security or privacy settings to enable the use of an authenticator app instead. On Twitter accounts, for example, the option is found in the Settings and Support dropdown menu, under Settings and privacy -> security and account access -> Security.

Using Setup Keys

Once you've enabled 2FA on the account or service in question, you'll be asked to either enter a setup key on your device or scan a QR code using your device's camera. If it's a setup key you're given, go to Settings -> Passwords, select the account from the list, then tap Set Up Verification Code.... Finally, tap Enter Setup Key in the pop-up menu and enter the key.

settings

Using QR Codes

If the account you're trying to secure gives you a QR code, open your iPhone or ‌iPad‌'s camera app and point the viewfinder at your computer's monitor screen showing the QR code.

When the viewfinder locks onto the code, tap Add Verification Code in Passwords. You'll be taken to Settings -> Passwords, where you may need to manually select the correct account to add the verification code. Once you've done that, your device will automatically generate verification codes on the password screen that are valid for 30 seconds.

In future, when you come to log in to the site or service and you're prompted for a verification code, iOS will automatically display the latest code above the virtual keyboard – all you need to do is tap the code to enter it into the input field, and away you go.

Popular Stories

apple pro tell logo

Apple Launching Two More New Products This Friday

Monday November 9, 2026 4:22 am PST by
The Apple launches keep coming! The company is set to release two new products on Friday, November 13: the all-new Apple HomeView and the fourth-generation Apple TV 4K, both of which have been available to pre-order since mid-October. Apple HomeView: Apple's new smart home display, powered by Apple Intelligence with Siri AI, for entertainment and managing the home. Available in tabletop and...
imac video apple feature

November 20 to Mark the End of an Era at Apple

Wednesday November 11, 2026 7:51 am PST by
Apple has announced that the long-running Apple Support Community discussion forums for user-to-user tech support will be permanently closing on Friday, November 20. The forums have existed in some form for nearly 30 years, so it is the end of an era. Effectively immediately, the Apple Support Community forums are in a read-only state, with new posts no longer being accepted. The final...
iOS 28 AI

Apple Taking New Approach to Developing iOS 28 and macOS 28

Sunday November 8, 2026 7:42 am PST by
Apple has made a change to its development process for iOS 28, macOS 28, and corresponding software updates, according to Bloomberg's Mark Gurman. In his Power On newsletter today, he said Apple separates development of each year's new operating systems into three major stages. Typically, he said each stage consists of four weeks of coding followed by a four-week "convergence" period where...
Latest Stories
Apple on Fatal Vehicle Crash Near Apple Park: 'Our Hearts Are Broken'
Apple on Fatal Vehicle Crash Near Apple Park: 'Our Hearts Are Broken'
3 hours ago
Apple Invites App Updated With Two New Features
Apple Invites App Updated With Two New Features
4 hours ago
Google Says Gemini App Rolling Out on Apple CarPlay Starting Today
Google Says Gemini App Rolling Out on Apple CarPlay Starting Today
5 hours ago
Is It Worth Buying a Ceramic Apple Watch?
Is It Worth Buying a Ceramic Apple Watch?
8 hours ago
Samsung Early Black Friday Event Brings Major Sales to Frame TVs and More
Samsung Early Black Friday Event Brings Major Sales to Frame TVs and More
9 hours ago
iPhone 18 Pro Max Wins Battery Test Involving 32 Smartphones
iPhone 18 Pro Max Wins Battery Test Involving 32 Smartphones
9 hours ago
AirTag 2 4-Pack Hits Record Low $69.99 Price Ahead of Black Friday
AirTag 2 4-Pack Hits Record Low $69.99 Price Ahead of Black Friday
11 hours ago
Rumored Apple Smart Glasses Mentioned in Supplier's Earnings Briefing
Rumored Apple Smart Glasses Mentioned in Supplier's Earnings Briefing
11 hours ago
Make Apple Watch Listen for Sounds Like the Doorbell
Make Apple Watch Listen for Sounds Like the Doorbell
15 hours ago
Apple Chip Supplier TSMC Approves $1 Billion AI Investment
Apple Chip Supplier TSMC Approves $1 Billion AI Investment
15 hours ago
'Apple Support Community' Permanently Closing on November 20
'Apple Support Community' Permanently Closing on November 20
21 hours ago
Apple's Holiday Gift Guide Highlights iPhone Duo and More
Apple's Holiday Gift Guide Highlights iPhone Duo and More
1 day ago
Three Workers Die at Tata iPhone Parts Plant in India
Three Workers Die at Tata iPhone Parts Plant in India
1 day ago
iCloud Mail, Calendar, Contacts and More Experiencing Outage [Updated]
iCloud Mail, Calendar, Contacts and More Experiencing Outage [Updated]
1 day ago
Apple's Claris Testing 'Harbor' App for Local AI on Macs
Apple's Claris Testing 'Harbor' App for Local AI on Macs
1 day ago
iFixit's PROLED MacBook Pro Teardown Reveals Logo LEDs
iFixit's PROLED MacBook Pro Teardown Reveals Logo LEDs
1 day ago
10 Free iPhone Duo Apps Worth Downloading
10 Free iPhone Duo Apps Worth Downloading
1 day ago
Apple Releases New AirPods Firmware
Apple Releases New AirPods Firmware
1 day ago
Amazon Begins Early Black Friday Sale, Featuring Sitewide Discounts on Tech and Decor
Amazon Begins Early Black Friday Sale, Featuring Sitewide Discounts on Tech and Decor
1 day ago
Apple Announces Swift Student Challenge Ahead of WWDC 2027
Apple Announces Swift Student Challenge Ahead of WWDC 2027
1 day ago
Next iPad Air Likely to Have These 10 New Features
Next iPad Air Likely to Have These 10 New Features
1 day ago
iPad Mini 2021 vs. 2026 Buyer's Guide: Is It Worth Upgrading?
iPad Mini 2021 vs. 2026 Buyer's Guide: Is It Worth Upgrading?
1 day ago
New Apple TV Sign Language Feature Announced
New Apple TV Sign Language Feature Announced
1 day ago
Disable Touch on MacBook Pro PROLED XDR and When Using Sidecar
Disable Touch on MacBook Pro PROLED XDR and When Using Sidecar
1 day ago
Anker's Early Black Friday Sale Surprises With Mystery Boxes and Big Discounts
Anker's Early Black Friday Sale Surprises With Mystery Boxes and Big Discounts
1 day ago
Apple Arcade Adding These Four Games in December
Apple Arcade Adding These Four Games in December
1 day ago
OLED iPad Air Rumored to Launch in Two Sizes in Early 2027
OLED iPad Air Rumored to Launch in Two Sizes in Early 2027
1 day ago
The Original iPod Went on Sale 25 Years Ago Today
The Original iPod Went on Sale 25 Years Ago Today
2 days ago
Apple Maps Could Factor Parking Into Your Arrival Time
Apple Maps Could Factor Parking Into Your Arrival Time
2 days ago
Waze Now Alerts Drivers to Nearby Cyclists Using Garmin LiveTrack
Waze Now Alerts Drivers to Nearby Cyclists Using Garmin LiveTrack
2 days ago