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

iPhone 17 Plus Feature

iPhone 17 'Slim': Everything We Know So Far

Friday July 5, 2024 5:13 am PDT by
In 2025, Apple is expected to discontinue the iPhone "Plus" device in its iPhone 17 lineup to make way for an iPhone "Slim" – although it may not actually be called this when it debuts in the fall of next year. Even though the iPhone 16 series launch is still over two months away, when you consider that we learned about larger displays on the iPhone 16 Pro models way back in May 2023, rumors...
iPhone 16 Camera Lozenge 2

Apple Leak Confirms Four iPhone 16 Models With Same A18 Chip

Tuesday July 2, 2024 9:48 am PDT by
Code discovered in Apple's backend by Nicolás Alvarez and shared with MacRumors confirms Apple's plans to release four iPhone 16 models this year, and it indicates that the devices will all have the same A-series chip. There are mentions of new model numbers that are not associated with existing iPhones, and that have the numbering scheme Apple uses for its flagship devices. The code...
f1662570472

Report: Apple Watch Series 10 to Offer Larger Screens and Faster Chip, but New Health Features in Trouble

Sunday July 7, 2024 8:31 am PDT by
The Apple Watch Series 10 will feature a larger display and a new chip, but new health monitoring features for the device are now in question, Bloomberg's Mark Gurman reports. In the latest edition of his "Power On" newsletter, Gurman said that the design of the Apple Watch Series 10 is "unlikely to look much different" to its predecessor, but it will be thinner. Meanwhile, the Apple Watch...
macbook pro blue

Best Buy Takes Up to $500 Off M3 MacBook Pro in New Sale

Sunday July 7, 2024 10:40 am PDT by
Best Buy this weekend is offering a big selection of discounts on Apple's late 2023 14-inch and 16-inch MacBook Pro, with up to $500 off select models. These deals are available to all shoppers and do not require a My Best Buy Plus or Total membership. Note: MacRumors is an affiliate partner with Best Buy. When you click a link and make a purchase, we may receive a small payment, which helps...
HomePod G4 Feature

Leak Confirms Apple's Work On 'Home Accessory'

Thursday July 4, 2024 9:15 am PDT by
Code discovered on Apple's backend by MacRumors confirms Apple is indeed working on a long-rumored home accessory in addition to the HomePod and Apple TV. The code references a device with the identifier "HomeAccessory17,1," which is a new identifier category. The name is similar to the HomePod's "AudioAccessory" identifier. Interestingly, the 17,1 in the identifier name suggests that...