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

iPhone 13 Security
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 macOS Monterey and later versions of its Mac operating system software, Apple's Safari browser (version 15 and later) includes a built-in two-factor authenticator that can 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.

Enabling 2FA on the Account or Service

First, make sure you have the latest version of Safari (Safari 17). Once you've done that, you'll need to enable the use of a 2FA app on whichever website or service you are trying to secure. Note that if you've already enrolled an account with 2FA on a mobile app, you'll either have to unenroll from 2FA or use the current 2FA code from your mobile app.

twitter 2fa
You may need to explore the security or privacy settings of the site to enable the use of an authenticator app. On X (formerly Twitter) accounts, for example, the 2FA option is found 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. Note that you'll need to ensure that Safari's AutoFill feature is enabled (Safari ➝ Settings ➝ AutoFill) and the website's login credentials are saved in Safari for the 2FA code generator to work properly.

  1. Open Safari, then select Safari ➝ Settings... from the menu bar.
  2. Choose the Passwords tab, then either type your user password or use Touch ID to authenticate.
  3. Find and open the entry for the site you want to add 2FA to, then click Set Up next to "Verification Code," under Account Options.
  4. If the site offers a setup key, enter it in the Setup Key field. If it offers a QR code, Control-click it and choose "Set Up Verification Code". (Alternatively, you can download the QR code image and choose it using the option.)

safari verification codes

Using Safari's Generated 2FA Code

  1. Open Safari and navigate to the website that requires two-factor authentication (2FA).
  2. Enter your username and password for the website as usual.
  3. When the site asks for a 2FA code, look for Safari's built-in suggestion that appears above the input field.
  4. Click on the 2FA code suggestion. Safari will automatically generate and fill in a 2FA code.
  5. Complete the login process by verifying the 2FA code, and you're done.

In future, when you come to log in to the site or service and you're prompted for a verification code, Safari will automatically display the latest code as an AutoFill option – all you need to do is click the code to enter it into the input field, and away you go.

Popular Stories

apple wallet drivers license feature iPhone 15 pro

Apple Plans to Expand iPhone Driver's Licenses to These 7 U.S. States

Thursday January 2, 2025 6:45 am PST by
In select U.S. states, residents can add their driver's license or state ID to the Wallet app on the iPhone and Apple Watch, providing a convenient and contactless way to display proof of identity or age at select airports and businesses, and in select apps. Below, we outline which U.S. states and territories offer the feature, and additional states that have committed to rolling it out in...
MacBook Air 15 Inch Feature Purple

New MacBook Air Models Coming Soon With These Rumored Features

Thursday January 2, 2025 6:42 am PST by
One of Apple's first product announcements of 2025 will likely be updated 13-inch and 15-inch MacBook Air models with the M4 chip. Below, we recap rumors about the next MacBook Air models. New Features Expected The new MacBook Air models are expected to be equipped with Apple's already-released M4 chip, which has a 10-core CPU and a 10-core GPU. Apple already updated the MacBook...
apple vision pro

Apple Vision Pro May Now Be Out of Production

Tuesday December 31, 2024 2:00 pm PST by
Apple's first-generation Vision Pro headset may have now ceased production, following reports of reduced demand and production cuts earlier in the year. In October, The Information's Wayne Ma reported that Apple had abruptly reduced production of the Vision Pro headset ahead of potential plans to stop making the current version of the device completely by the end of 2024. With the year now...
aapl logo banner

Apple Broke a 13-Year Hardware Streak in 2024

Wednesday January 1, 2025 1:00 am PST by
For over a decade, Apple has consistently announced all-new hardware product lines, from the iPad in 2010 to the Vision Pro in 2023. But for the first time in 14 years, Apple failed to announce any major new hardware products in 2024, focusing solely on updates and refinements to its existing product lines. While Apple unveiled a large number of significant hardware refreshes in 2024, such...
iPhone SE 4 Thumb 1

'iPhone SE 4' Rumored to Be Named 'iPhone 16E'

Wednesday January 1, 2025 8:31 am PST by
Apple is expected to release a fourth-generation iPhone SE in March, but it has been rumored that the device will have a different name. The device succeeding the third-generation iPhone SE will be named the iPhone 16E, according to a December 13 post from Fixed Focus Digital, an account with over two million followers on Chinese social media platform Weibo. On December 31, another leaker...
iPhone 17 Slim Feature Single Camera 1 Redux

iPhone 17 Air's Thickness and Price Range Revealed in New Report

Friday January 3, 2025 7:16 am PST by
Apple is widely rumored to be planning an ultra-thin iPhone 17 model for release later this year, and a new report offers a few purported details. South Korea's Sisa Journal today reported that Apple is aiming for the so-called "iPhone 17 Air" to be 6.25mm thick. If that measurement ends up being accurate, the device would become the thinnest iPhone ever, topping the current 6.9mm record set ...
carplay next gen hero

RIP, CarPlay 2?

Sunday December 29, 2024 7:32 am PST by
Apple's website continues to state that the first vehicle models with next-generation CarPlay will "arrive in 2024." With less than three days remaining in the year, however, that timeframe is looking more and more unlikely. It would not be entirely Apple's fault if the stated 2024 target is missed, given that it is ultimately up to automakers to roll out the software in vehicles, but it is...
Apple Hefei Wallpaper Mac

Apple Shares Special Wallpaper and Watch Face to Celebrate New Store

Wednesday January 1, 2025 8:59 am PST by
Apple recently announced it will be opening a new retail store at the MixC Hefei shopping mall in Hefei, China on January 18 at 10 a.m. local time. To celebrate the store's upcoming grand opening, Apple has shared both a special wallpaper and Apple Watch face featuring a custom-designed Apple logo. The wallpaper is available for the iPhone, iPad, and Mac. Ahead of the Chinese New Year...