Privacy

Two-Factor Authentication Examples: 10 Ways 2FA Works in Real Life

Two-factor authentication is not one thing. Here are ten real examples, from a texted code to a tap on a security key, and which ones actually resist phishing.

Cysoro Security TeamPublished · 10 min read
PRIVACYTwo factors,ten realexamples.From a texted code to a tap on a key.Passwordsomething you know+Security keysomething you have= 2FA
Quick answer

Two-factor authentication (2FA) means proving your identity with two different factors, usually something you know, such as a password, plus something you have, such as a phone or security key. Common examples are a code texted to your phone, a six-digit code from an authenticator app, a push prompt, a tap on a hardware security key, a passkey, and a fingerprint. Security keys and passkeys resist phishing; SMS and app codes can be phished.

Key takeaways

  • 2FA combines two different factors: something you know, something you have, or something you are.
  • Authenticator apps and push prompts are stronger than SMS codes, which can be intercepted or SIM-swapped.
  • Security keys and passkeys are the only widely available phishing-resistant options, according to CISA.

You have probably used two-factor authentication today without thinking about it: a code on your phone, a tap on a prompt, a fingerprint to unlock a banking app. But not all of those examples protect you equally, and the difference matters when an attacker has your password.

What is two-factor authentication?

Two-factor authentication, or 2FA, means proving who you are with two different factors. The three factor categories are something you know, something you have, and something you are.

A password alone is one factor: something you know. Add a code from your phone, and you have added something you have. Add a fingerprint instead, and you have added something you are. Two factors from different categories is what makes it 2FA.

Two passwords do not count as 2FA, because they are the same kind of factor. Neither does a password plus a security question, because both are things you know. The second factor must come from a different category.

CISA lists requiring MFA as one of its four essentials for state, local, tribal and territorial governments, and it ranks the methods: security keys first, then authenticator apps, then texted codes. That ranking is the thread running through every example below. You can read the ranking in CISA's four cybersecurity essentials.

1. SMS code: a texted one-time code

You enter your password, the service texts a five or six-digit code to your phone, and you type it in to finish signing in. This is the most common 2FA example, and the easiest to set up.

It works because most people always have a phone, and no app is needed. Banks, social networks and email providers all offer it, and for many people it is the only 2FA option they have ever used.

The weakness is the phone network. Texts can be intercepted through weaknesses in phone signaling, and an attacker can persuade a mobile carrier to move your number to a SIM they control, in a SIM swap attack. Once they control the number, your codes go to them.

Use SMS 2FA if it is the only option a service offers. It still stops an attacker who only has your password. But if the service also offers an authenticator app or a security key, switch to that instead.

2. Authenticator app: a code that changes every 30 seconds

An authenticator app such as Google Authenticator or Microsoft Authenticator generates a six-digit code on your phone that changes every 30 seconds. You scan a QR code once to set it up, then the app and the service generate matching codes independently.

This is called a time-based one-time password, or TOTP. The code is generated on your device, not sent over the network, so it works without a mobile signal and cannot be intercepted in transit like a text message.

The code can still be phished. If you type it into a fake login page, an attacker can relay it to the real site within its 30-second window. That is why NIST SP 800-63B Revision 4 says manually entered one-time codes are not phishing-resistant.

Even so, an authenticator app is a clear step up from SMS. It is free, it works offline, and it is supported by almost every major service. It is the best default for most people.

How an authenticator app works1Scan QR codeonce, when youset up 2FA2App makes a codenew 6-digit codeevery 30 seconds3Type it inwith your passwordto finish sign-inNo signal needed: the code is generated on your phone, not sent to it.
How a time-based one-time password (TOTP) authenticator app works. Illustration by Cysoro.

3. Push prompt: tap approve on your phone

You enter your password, and a notification appears on your phone asking you to approve the sign-in. You tap Approve, and you are in. No code to type.

This is the method behind Duo Push, Microsoft Authenticator push, and the prompts Google and Apple send to your devices. It is fast and it works well for people who find codes annoying.

The risk is push fatigue, also called MFA fatigue. An attacker who has your password can trigger prompt after prompt, hoping you eventually tap Approve just to make them stop, or tap it by mistake. CISA warns organizations to train people to recognize and report this.

Number matching fixes much of this. With number matching, the login screen shows a number, and you must type that number into the prompt on your phone. An attacker cannot complete the sign-in unless they know the number, and you cannot approve it by accident.

4. Hardware security key: tap a physical key

You enter your password, then plug a small USB or NFC key into your device and tap it. The key cryptographically signs a challenge from the real website, and the private key never leaves the key.

This is FIDO2 and WebAuthn authentication, and it is the strongest widely available form of 2FA. CISA calls phishing-resistant MFA the gold standard, and says FIDO and WebAuthn is the only widely available phishing-resistant authentication.

The reason is binding. The key creates a credential for one specific website, so a fake login page gets nothing it can reuse. Even if you are tricked into visiting a phishing site, the key will not sign in there.

Security keys cost money and you can lose one, so enrol two keys per important account and store recovery codes safely. For email, banking and admin accounts, a key is the best money you will spend on security.

5. Passkey: your device is the second factor

A passkey is a cryptographic credential stored on your phone or computer, unlocked by your fingerprint, face or PIN. When you sign in, your device proves it holds the passkey for that exact website.

Passkeys are built on the same FIDO2 standards as security keys. The difference is that the credential lives on a device you already own, and it can sync across your devices, instead of living on a separate physical key.

Because a passkey is bound to the real website, it is phishing-resistant in the same way a security key is. A fake site cannot use it, and there is no password to steal or reuse. NIST SP 800-63B Revision 4 supports syncable authenticators, which is the category passkeys fall into.

Where a service offers passkeys, use them. They are faster than codes, they remove the password entirely, and they are the direction the industry is moving. Keep a second sign-in method enrolled as a backup.

6. Biometrics: fingerprint and face

You enter your password, then unlock the sign-in with your fingerprint or face. On a phone, this is often how a passkey or an authenticator app is unlocked, so the biometric is part of a multi-factor sign-in rather than a factor on its own.

Biometrics are convenient because you always have them with you, and they are hard for a remote attacker to copy. They also solve the problem of typing codes on a small screen.

They have limits. A biometric on its own is not an authenticator under NIST guidance; it must be combined with something you have, such as the device that holds the credential. And unlike a password, you cannot change your fingerprint if it is ever compromised.

Use biometrics as the unlock for a passkey or security key, not as a replacement for a second factor. That combination is both convenient and strong.

7. Smart card: PIV and CAC cards

Federal employees will know this example well. You insert a PIV or CAC smart card into a reader and enter a PIN. The card holds a certificate, and the PIN unlocks it.

This is PKI-based MFA, the second family CISA names as phishing-resistant, alongside FIDO and WebAuthn. The certificate is bound to the card, and the sign-in is cryptographic rather than a typed code.

Smart cards are less common outside government and large enterprises, because they need card readers, certificate management and a mature identity system. For most readers, a security key or passkey gives the same protection with far less infrastructure.

8. Email code: a code sent to your inbox

You enter your password, and the service emails you a one-time code. You open your inbox, copy the code, and paste it into the login form.

This is better than no second factor, and it is useful when you have no phone signal. But it is weak as 2FA, because the code goes to the very account an attacker may already be trying to take over.

If your email is compromised, email codes offer no extra protection at all. Treat an email code as a last resort, and protect your email account itself with an authenticator app or a security key first.

9. Backup and recovery codes

When you set up 2FA, many services give you a set of one-time recovery codes to print or save. Each code can be used once, in place of your usual second factor, if you lose your phone or key.

These are an example of a look-up secret in NIST terms: a secret issued by the service and used only once to prove possession. NIST says look-up secrets must be at least six digits long and stored in a hashed form.

Store recovery codes somewhere safe and offline, such as a printed sheet in a locked drawer or your password manager. Do not store them in the same place as your password, and do not photograph them and leave the photo in your camera roll.

Which 2FA example should you use?

The right choice depends on the account. Use the strongest method the service offers, and use a weaker method only when nothing stronger is available. CISA puts it simply: any form of MFA is better than no MFA.

ExampleFactor typePhishing-resistant?Best for
Security keySomething you haveYesEmail, banking, admin accounts
PasskeySomething you have, unlocked by biometric or PINYesEveryday sign-ins where offered
Smart card (PIV/CAC)Something you have, plus PINYesFederal and enterprise users
Push with number matchingSomething you haveNo, but resistant to push fatigueWork accounts with Duo or Microsoft Authenticator
Authenticator app (TOTP)Something you haveNoMost personal accounts
Push without number matchingSomething you haveNoQuick approvals, with care
SMS codeSomething you haveNoOnly when nothing else is offered
Email codeSomething you haveNoLast resort

For a practical plan, use passkeys or security keys for email and banking, an authenticator app for everything else that supports it, and SMS only where it is the sole option. You can check whether your password itself is already compromised with our pwned password checker.

Real-life examples: 2FA in everyday accounts

Here is how the examples above map to accounts you already use. The pattern is the same everywhere: password first, second factor second.

  • Google account: password, then a prompt on your phone, a security key, or a passkey. Google also offers authenticator app codes.
  • Microsoft account: password, then Microsoft Authenticator with number matching, or a passkey.
  • Apple ID: password, then a six-digit code shown on a trusted Apple device.
  • Banking app: password or PIN, then a fingerprint, a code from the bank's app, or a texted code.
  • Password manager: master password, then a security key or authenticator app code. This is the account to protect first, because it holds all the others.

Notice that the strongest accounts in that list use a device or a key, not a text message. When you set up 2FA on a new account, look for the security key or passkey option before you accept the SMS default.

2FA methods, strongest to weakest1. Security key / passkey — phishing-resistant2. Push with number matching3. Authenticator app code (TOTP)4. Push without number matching5. SMS or email codeBased on CISA guidance on phishing-resistant MFA. Any 2FA beats no 2FA.
Two-factor methods ranked by phishing resistance, following CISA guidance. Illustration by Cysoro.

How do you set up 2FA in five minutes?

Setting up 2FA is quick on most services, and the steps are nearly identical everywhere. Do your email account first, because it can reset the others.

  1. Open security settings. Look for Security, Sign-in, or Two-factor authentication in the account settings.
  2. Choose the strongest method offered. Pick a security key or passkey first, then an authenticator app, then SMS.
  3. Follow the setup prompts. Scan the QR code with your authenticator app, or tap your security key when asked.
  4. Save your recovery codes. Print them or store them in your password manager before you finish.
  5. Enrol a second authenticator. Add a second key, a second device, or a backup code set, so losing one does not lock you out.

If you use a password manager, check whether it can store TOTP codes as well. That is convenient, but keep in mind that storing the password and the code in the same place weakens the separation between factors. A separate authenticator app is safer for your most important accounts.

Common 2FA mistakes to avoid

The most common mistake is turning on SMS 2FA and stopping there, when the service also offers an authenticator app or a security key. The second is approving push prompts without reading them, which is exactly how push fatigue attacks succeed.

Other mistakes are easy to make. Do not share a code with anyone, even someone claiming to be support: a real support agent will never ask for it. Do not enrol only one authenticator and lose access to it. And do not leave the fallback method weaker than the main one, because attackers will use the weakest path in.

Finally, do not assume 2FA makes a weak password safe. A password that appears in a breach should still be changed. Use a strong, unique password for each account, then add the best second factor you can.

The bottom line

Two-factor authentication is not one method. It is a ladder, from a texted code at the bottom to a security key or passkey at the top, and every rung is better than standing on the password alone.

Start with your email, banking and password manager accounts. Turn on the strongest 2FA each one offers, save your recovery codes, and check your passwords with the free pwned password checker while you are there.

Frequently asked questions

What is an example of two-factor authentication?

Logging in with your password and then entering a six-digit code from an authenticator app is a classic example. Another is entering your password and then tapping a hardware security key. Both use two different factors: something you know and something you have.

What are the three types of two-factor authentication?

The three factor categories are something you know, such as a password or PIN, something you have, such as a phone, security key or smart card, and something you are, such as a fingerprint or face. 2FA combines two factors from different categories.

Is an SMS code two-factor authentication?

Yes. A password plus a code sent by text message is two-factor authentication, because it combines something you know with something you have. It is the weakest common form, because texts can be intercepted and phone numbers can be moved to another SIM by an attacker.

Are passkeys two-factor authentication?

A passkey can act as a single multi-factor authenticator when it is unlocked by a fingerprint, face or PIN on your device. It replaces the password with a cryptographic key bound to the real website, which is why CISA calls FIDO and WebAuthn authentication phishing-resistant.

Which 2FA method is the most secure?

A hardware security key or a device-bound passkey is the most secure widely available option. CISA calls phishing-resistant MFA the gold standard. Authenticator apps with number matching are next, followed by app codes, then push prompts without number matching, then SMS.

What is the difference between 2FA and MFA?

Two-factor authentication is a type of multi-factor authentication that uses exactly two factors. MFA is the broader term and can use two or more factors. In everyday use the two terms are often used interchangeably.

What happens if I lose my second factor?

Use the recovery codes you saved when you set up 2FA, or use a second enrolled authenticator if you have one. If neither is available, contact the service's support and expect identity checks. Enrol two authenticators per account so losing one does not lock you out.

Do I need 2FA on every account?

Yes, wherever it is offered, starting with email, banking, your password manager and cloud storage. Your email account can reset many other accounts, so protecting it with the strongest 2FA you can is the highest-value step.

Sources

  1. CISA — Four Cybersecurity Essentials for SLTTs
  2. CISA — Implementing Phishing-Resistant MFA (fact sheet, via Okta)
  3. NIST — SP 800-63B-4, Authenticators
  4. Electronic Frontier Foundation — A Guide to Common Types of Two-Factor Authentication on the Web
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against CISA guidance on phishing-resistant MFA, NIST SP 800-63B Revision 4 and the EFF guide to common 2FA types.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free