What Is Two-Factor Authentication? Methods, Apps and Backup Codes
Two-factor authentication adds a second check after your password, so a stolen password alone cannot open your account. Learn the methods and backup codes.
By Galactic News Editorial · Published 2026-11-19T04:39:45+00:00 · Updated 2026-11-19T04:39:45+00:00
What Is Two-Factor Authentication? Methods, Apps and Backup Codes
Two-factor authentication, or 2FA, adds a second check after your password. You prove you are you in two different ways. A stolen password alone is then not enough to open your account. This guide explains what is two-factor authentication, how each method works, which ones are strongest, and what to do with backup codes.
What is two-factor authentication?
Two-factor authentication asks for two kinds of proof before it lets you in. The first is usually something you know, like a password. The second is something you have, like your phone, or something you are, like a fingerprint. The US Cybersecurity and Infrastructure Security Agency, CISA, calls this multifactor authentication, or MFA. It lists email, banking, social media, online shopping, and gaming accounts as the places to turn it on first. CISA says MFA makes an account significantly less likely to be hacked. The idea is simple. Passwords leak in breaches. They get guessed. They get phished. A second factor stops an attacker who has only the password.
How two-factor authentication works
Sign-in happens in two steps. First, you enter your username and password as usual. Then the service asks for a second proof. That proof depends on the method you chose. You might type a six-digit code from an app. You might tap a prompt on your phone. You might touch a security key. The service checks that second proof before it opens the account. Some services remember a device for 30 days. You only see the second step on a new device. Others ask every time. Both are fine. The key point is that the second factor is tied to something only you control.
Two-factor authentication methods, ranked strongest to weakest
| Method | How it works | Phishing-resistant? | Main weakness |
|---|---|---|---|
| Passkey or security key (FIDO) | A cryptographic key on your device or a USB key you tap | Yes | Not offered everywhere yet |
| Push prompt with number matching | You type a number from the login screen into your phone app | Mostly | Needs a phone and a data connection |
| Authenticator app code | An app shows a new six-digit code every 30 seconds | No | A code typed into a fake site can be relayed |
| SMS or voice code | A code is texted or read to your phone number | No | SIM swaps and phone-network attacks |
| Email code | A code is sent to your inbox | No | Your email is often the recovery route for everything |
CISA calls FIDO and WebAuthn the only widely available phishing-resistant option. A passkey or security key ties its response to the real website's domain. A fake site cannot replay it. Authenticator apps sit in the middle. Their codes are generated on your phone. Nothing travels over the phone network, so SIM swaps do not apply. But a code can still be phished. You read it and type it into a page. If that page is fake, the attacker can relay the code in real time. SMS codes are the weakest. CISA says they should only be used as a last resort. Text messages are not encrypted. An attacker can trick a carrier into moving your number to their device. That is called a SIM swap. Still, CISA is clear on one point: any form of MFA is better than no MFA. If SMS is all a service offers, turn it on.
Authenticator apps: how to set one up
An authenticator app generates time-based one-time codes. The codes change every 30 seconds. They work offline. No signal is needed. The well-known free options are Google Authenticator and Microsoft Authenticator. Password managers such as 1Password and Bitwarden can also generate the codes. Setup takes about a minute. Open the account's security settings. Find 'Two-factor authentication' or '2-Step Verification'. Choose 'Authenticator app'. The site shows a QR code. Scan it with the app. The app starts showing six-digit codes. Type the current code into the site to confirm. That is it. The app and the service now share a secret. The secret never leaves your phone. If you switch phones, you must move the app or set up the codes again. Some apps back up to the cloud. Others do not. Check before you switch devices.
Passkeys and security keys: the strongest option
A passkey replaces the password and the second factor with one step. You unlock it with your fingerprint or face. The key lives on your device. It cannot be phished, because it only works on the real site. Google, Apple, and Microsoft all support passkeys now. A hardware security key is a small USB or NFC device you tap. YubiKey is the best-known brand. It works the same way. The key proves who you are without a code to type. Use a passkey or a security key on your most important accounts first. Email and banking matter most. Your email can reset the passwords on almost everything else. If a service offers passkeys, take them. Keep an authenticator app as a backup method on the same account.
Push prompts and number matching
A push prompt sends a notification to your phone when someone tries to sign in. You tap approve or deny. Plain push prompts have a weakness. Attackers can spam prompts until a tired user taps approve by mistake. That is called push bombing. Number matching closes much of that gap. The login screen shows a number. You must type that number into the app before it approves. CISA recommends number matching for organizations that cannot move to phishing-resistant methods yet. Microsoft and Google both support it. If your service offers number matching, turn it on.
Backup codes: what they are and where to keep them
Backup codes are one-time codes a service gives you when you turn on 2FA. Each code works once. They are your way back in if you lose your phone. Print them or save them in your password manager. Do not store them only on the phone they protect. That defeats the purpose. Treat backup codes like spare house keys. Keep them somewhere safe, separate from the device. Most services give you eight to ten codes. If you use one, generate a fresh set. Some services also let you add a second method, such as a security key plus an authenticator app. Two methods beat one. If you lose your phone, you still have a way in. Check your backup codes once a year. Replace them if you have used any.
How to turn on two-factor authentication
- Start with your email account. It resets passwords everywhere else.
- Open settings, then Security or Password and Security.
- Find the option called two-factor, two-step, or multifactor authentication.
- Pick the strongest method the service offers: a passkey, then an authenticator app, then SMS.
- Save the backup codes in your password manager or on paper.
- Add a second method if the service allows it.
- Repeat for banking, social media, and shopping accounts.
One warning: adding an authenticator app does not always remove SMS from your account. Many services keep the text code as a fallback. A SIM swap can then still get an attacker in. Check the settings after setup. Remove SMS as a recovery option if the service lets you.
Bottom line
Two-factor authentication is the single best step after a strong password. Use a passkey or a security key where offered. Use an authenticator app next. Use SMS only when nothing stronger exists. Save your backup codes somewhere safe. Then turn it on for every account that offers it, starting with email.