How to Use Safari for Mac as an Authenticator App

Use Safari as a 2FA Authenticator App

Want to use two-factor authentication to protect your accounts online—without codes through text message, calls or even a separate “authenticator” app? Find out here how to set up and use Safari as a two-factor authenticator app on a Mac.

First, Look at a Lava Lamp’s Perturbations

Look at a lava lamp for a short while. Look for a long while.

No matter how intently you stare, you will never quite know what pattern und perturbation comes next.

This unpredictability makes a concert of lava lamps a swell source for randomness. Randomness, of course, is important for safe encryption.

So, a camera stares at some one hundred lava lamps in motion at Cloudflare’s offices to help keep Internet traffic secure.

You can do something, too, for security with two-factor authentication—and you need not even stare at your phone to do it:

How to Set Up Safari for Mac as a Two-Factor Authenticator App

Time needed: 3 minutes

To add a new web site account for generating two-factor authentication codes right in Safari for macOS on a Mac:

  1. Click on the QR code for setting up a two-factor authenticator (2FA) app with the right mouse button in Safari.

    No QR code: If you have no QR graphic but an alphanumeric code, see below.

  2. Select Set Up Verification Code from the connects menu that has appeared.

    Set up Safari as a 2FA authenticator app

  3. Unlock passwords with your iCloud or macOS authentication

  4. Highlight the account for wich you want to add the 2FA authenticator code.

  5. Click Add Verification Code.

On an iPhone? How to Use Safari as an Authenticator App on iPhone

Set up Safari as a 2FA Authenticator App without a QR Code

To set up 2-factor authentication in Safari using an alphanumeric code:

  1. Open System Settings (or System Preferences) on the Mac.
    Here’s how: Choose  (Apple logo) in the menu bar, for instance, and select System Settings… from the menu that appears.
  2. Go to the Passwords category.
    Alternative: You can also open the Passwords tab in Safari settings; they access the same set of passwords and 2FA authentication data.
  3. Log in to the Mac account with your password, fingerprint, or other means of authentication.
  4. Highlight the web site account for which you want to add two-factor authentication data.
    New account: You can also click + to add a new account, of course.
  5. Click Edit….
  6. Now select Enter Setup Key… under Verification Code:.
  7. Type or paste the code for setting up two-factor authentication from the web site or app.
  8. Click OK.

Enter a Verification Code using Safari as a Two-Factor Authenticator App

To authenticate on a website using Safari’s built-in 2FA authenticator app:

  1. Click in the field to enter the authentication code.
  2. Select the desired account from auto-complete data.
    Authorize: Authenticate with your Mac using password, fingerprint or another factor if prompted.
  3. Press Enter if needed.
    Done automatically: Usually, Safari will submit the authentication code automatically without you pressing Enter.

How to Use Safari as a Two-Factor Authenticator App for Mac: FAQ

Can I copy the verification code for use in a different browser?


To use the code generated by the Safari two-factor authentication app in another browser:

  1. Open Passwords in System Settings (see above).
  2. Search for an open the desired account.
  3. Click on the code under Verification Code.
  4. Select Copy Verification Code from the context menu that has appeared.

Can I reset or renew the authentication info for an account?

Each account always can only have one key shared between the site and Safari for authenticating access.

To add a new key, first delete the old one:

  1. Open Passwords in System Settings. (See above.)
  2. Highlight the account for which you want to add new 2FA information.
    Search: Click in the Search field, of course, and type the domain or username.
  3. Click Edit….
  4. Now click Delete Verification Code.
  5. Click Delete Verification Code again.
  6. Now click Save.

How does code generation for 2FA work?

When you set up code generation in Safari for two-factor authentication, you enter a secret value from the web site into Safari.


  • that secret value (known now to both the site and your Safari, but nobody else),
  • a value derived from the current time (also shared) and
  • a common algorithm,

both the website and Safari compute a code, which they then compare.

(How to use Safari as a two-factor authenticator app for Mac tested with Safari 15–17; first published October 2021, last updated April 2024)

Home » Mac Tips and Resources » How to Use Safari for Mac as an Authenticator App