Use two-factor authentication for Apple ID security on your Mac, iPhone and iPad
Two-factor authentication is an extra layer of security for your Apple ID designed to ensure that you’re the only one who can access your account — even if someone knows your password.
Note: For two-factor authentication, you can use either a six-digit verification code or a physical security key. To learn more about using security keys, see Use security keys for two-factor authentication.
Turn on two-factor authentication for your Apple ID
When you sign in to your account, you see that two-factor authentication is already on if it was turned on in the past. If it’s not on, you can turn it on while setting up a new Mac or follow the steps below any time to turn it on in Password & Security settings.
On your Mac, choose Apple menu > System Settings, then click [your name] at the top of the sidebar.
If you don’t see your name, click Sign in with your Apple ID to enter your Apple ID or to create one.
Click Password & Security on the right, then click “Turn on” next to Two-Factor Authentication. If prompted, enter your Apple ID password, then click “Sign in”.
Answer your security questions, then click Continue.
Enter your phone number for verification, select a verification method, then click Continue.
When asked, verify your identity with the six-digit verification code sent to your trusted phone number. You won’t be asked for a verification code again on your Mac unless you sign out of your Apple ID completely, erase your Mac or need to change your password for security reasons.
Sign in to a new device or browser with a verification code
A verification code is a temporary code sent to your trusted devices or phone number when you sign in to a new device or browser with your Apple ID.
Important: When you receive a verification code, don’t share it with other people.
When you’re asked for the verification code, look for a notification at a trusted phone number or on any of your trusted devices.
To resend the code to a trusted phone number, click “Didn’t get a verification code?” in the notification, then choose the phone number.
On a trusted device, tap or click Allow to see the code on that device.
Enter the code on your Mac.
Get a verification code on a Mac, even when it’s offline
If you can’t receive a verification code on your phone or trusted devices or if none of them are available, you can get a verification code in Password & Security settings, even if your Mac is offline.
Important: When you receive a verification code, don’t share it with other people.
On your Mac, choose Apple menu > System Settings, then click [your name] at the top of the sidebar.
If you don’t see your name, click Sign in with your Apple ID to enter your Apple ID or to create one.
Click Password & Security on the right, then click Get Verification Code.
Note: This option doesn’t appear if you’ve added security keys.
Enter the code in the notification, then click OK.
If you already use two-factor authentication, you can no longer turn it off. Certain features in the latest versions of iOS, iPadOS and macOS require this extra level of security. If you recently updated your account to turn on two-factor authentication and then decide not to use it, you must stop using it within 2 weeks. Open your enrolment confirmation email and click the link to return to your previous security settings.
You can manage your trusted devices and phone numbers on your Mac, or by signing in to your Apple ID account page.