Setup Guide

How to Set Up 2FA on iPhone and Android

Two-factor authentication (2FA) is one of the most effective ways to protect your online accounts. While the setup process is similar across devices, there are important differences between iPhone and Android that you need to know. This guide walks you through every method available on both platforms.

Key Takeaways

  • โœ“ Both iPhone and Android have built-in 2FA code generators โ€” no extra app needed for most services
  • โœ“ App-based 2FA (TOTP) is significantly more secure than SMS, especially against SIM-swap attacks
  • โœ“ Authy is the best cross-platform choice if you switch between iPhone and Android
  • โœ“ Always save backup codes in a password manager before enabling 2FA on any account

iOS Built-in 2FA

Apple has built 2FA code generation directly into iOS through iCloud Keychain. This means you do not need a separate authenticator app for most services. The feature generates time-based one-time passwords (TOTP) for any website that supports them and stores them securely in your iCloud Keychain.

How to enable it: Open Settings on your iPhone, tap your name at the top, then tap Passwords. Authenticate with Face ID, Touch ID, or your passcode. You will see a list of saved passwords. When you add a new account with 2FA, the website displays a QR code. Tap the QR code field in the password entry โ€” iOS will ask if you want to set up a verification code. Tap Set Up Verification Code and scan the QR code with your camera. iOS will generate 2FA codes automatically from that point on.

Auto-fill behavior: When you sign in to a website on Safari or any app using system auto-fill, iOS automatically appends the current 2FA code after your username and password. This makes the login process nearly seamless. You only ever see the code if auto-fill fails for some reason, in which case you can open Settings > Passwords, tap the account, and copy the code manually.

iCloud sync: Your 2FA codes sync across all your Apple devices through iCloud Keychain. Set up a code on your iPhone and it appears instantly on your iPad and Mac. This is one of the most convenient 2FA implementations available on any platform. The only caveat is that it only works within the Apple ecosystem. If you use Android or Windows, you will not have access to these codes.

Android Built-in 2FA

Android also offers built-in 2FA support through Google Play Services. The feature is part of the Google Password Manager and works across any Android device running Google Play Services version 21.30 or newer.

How to enable it: Open Settings on your Android phone and search for Autofill. Select Google Autofill. Under Passwords, passkeys, and autofill, make sure Google Password Manager is selected. When you enable 2FA on a website, it will show a QR code. On Android, tap the QR icon in the autofill overlay that appears, or open Settings > Passwords & accounts, select the account you are setting up, and tap Set up verification code. Point your camera at the QR code and Android will save the TOTP secret.

Auto-fill behavior: Android's 2FA auto-fill works system-wide, including in Chrome, other browsers, and native apps. When you sign in to a service, Android suggests the 2FA code alongside your saved password. Tap the suggestion and the code is inserted automatically. This works similarly to iOS but with broader support across different apps and browsers.

Google Account sync: Your 2FA codes are backed up to your Google Account. If you get a new Android phone, signing in restores all your saved codes. This is a significant improvement over older approaches where codes were stored locally and lost when you switched devices.

Google Authenticator Setup

Google Authenticator is the most widely used standalone TOTP app. It works identically on iPhone and Android, making it a solid choice regardless of your platform.

Installation and setup: Download Google Authenticator from the App Store (iPhone) or Google Play Store (Android). Open the app and tap the + (plus) button. Select Scan a QR code and point your camera at the 2FA setup QR code displayed by the service you are securing. The app will immediately begin generating six-digit codes that refresh every 30 seconds.

If the service provides a manual setup key instead of a QR code, tap Enter a setup key and type the key and account name. The app will generate the same codes. Every QR code encodes a secret key in the otpauth:// URI format, so both methods produce identical results.

Cloud backup (added in 2023): Earlier versions of Google Authenticator stored codes only on the device, meaning you lost everything if you lost your phone. The 2023 update added encrypted cloud backup to your Google Account. Tap the menu icon (three dots) in the top-right corner, go to Settings > Back up to Google Account, and toggle it on. Your codes are now recoverable if you switch devices. Note that this backup is tied to your Google Account, so you lose access if you lose access to that account.

Pros: Simple, free, no ads, works offline, cloud backup available. Cons: No PIN or biometric lock within the app, no desktop version, no password-protected exports.

Microsoft Authenticator Setup

Microsoft Authenticator is a strong alternative that adds enterprise-grade features like push-based approval and passwordless login support. It works on both iPhone and Android.

Installation and setup: Download Microsoft Authenticator from the App Store or Google Play. Open the app and follow the onboarding flow, which will ask you to sign in to your Microsoft account. This step is optional for TOTP-only use, but required for cloud backup. Tap the + button and choose Other account (Google, Facebook, etc.). Scan the QR code or enter the setup key manually.

Cloud backup: Microsoft Authenticator backs up your codes to your Microsoft account. Unlike Google Authenticator, this happens automatically once you sign in. If you get a new phone, install the app, sign in to the same Microsoft account, and your codes are restored. This makes device transitions smoother than any other app.

Passwordless login: For Microsoft accounts, the app supports push-based approval. Instead of typing a six-digit code, you get a push notification and tap Approve. This is faster and more convenient than manual code entry. For non-Microsoft services, the app generates standard TOTP codes.

Security features: Microsoft Authenticator supports PIN and biometric lock โ€” the app requires Face ID, Touch ID, or a PIN before showing codes. This adds a layer of protection if your phone is unlocked and an attacker opens the app.

Authy Setup

Authy is the best choice for users who want multi-device access and cross-platform compatibility. It is the only major authenticator app with native desktop support.

Installation and setup: Download Authy from the App Store or Google Play. During setup, you register your phone number โ€” this is how Authy identifies your account. You will receive a SMS or call to verify. Set a master password that encrypts your TOTP tokens before they leave your device. This password is never sent to Authy's servers, which means even Authy cannot read your tokens.

Tap Add Account and scan the QR code. Authy stores the encrypted token. By default, Authy enables multi-device โ€” you can install the app on your iPad, another phone, or the Authy desktop app and all codes stay in sync.

Encrypted backups: Authy's backup model is the most robust. Your TOTP tokens are encrypted with your master password before being uploaded to Authy's servers. If you lose your phone, install Authy on a new device, verify your phone number, enter your master password, and all tokens restore. No need to re-scan QR codes for every service.

Desktop app: Authy offers desktop apps for Windows, macOS, and Linux. This is unique among authenticator apps. Developers often keep Authy open on a second screen to copy codes quickly. The desktop app uses the same encrypted sync as the mobile version.

Cons: Requires phone number registration (privacy concern for some users), and the phone number requirement means you cannot use Authy completely anonymously. The app interface is heavier than Google Authenticator.

SMS vs App-Based 2FA on Mobile

Many services offer SMS codes as a 2FA option alongside app-based TOTP. Understanding the security difference matters when you choose which method to use.

Why app-based is more secure: SMS 2FA sends a code via text message to your phone number. The vulnerability is that phone numbers can be transferred to a different SIM card through social engineering โ€” this is called a SIM-swap attack. An attacker calls your mobile carrier, convinces them to transfer your number to their SIM, and then receives your SMS codes. This is a well-known attack used to hijack cryptocurrency accounts and high-value social media profiles. For a deeper analysis, see our SMS vs authenticator app comparison.

App-based TOTP codes are generated on your device using a secret key stored in the app. An attacker cannot intercept these codes by targeting your phone number. They would need physical access to your unlocked phone or access to your encrypted cloud backup. This is a substantially narrower attack surface compared to SMS.

When SMS is acceptable: Despite the SIM-swap risk, SMS-based 2FA is still far better than no 2FA at all. Google's research found that SMS 2FA blocks 100% of automated bot attacks, 96% of bulk phishing, and 76% of targeted attacks. If a service only offers SMS and not TOTP, enable SMS 2FA. It is still a massive improvement over password-only protection.

Best practice: Use app-based 2FA whenever possible. If SMS is your only option, check whether the service also offers backup codes โ€” print or store those in your password manager. This gives you an alternative authentication method that does not rely on SMS.

Quick tip: You can also generate 2FA codes without installing any app. Use 2faco.com to generate TOTP codes directly in your browser.

Related Articles