Authentication and Two-Factor Authentication

What it takes to prove you are you, beyond just a password.

What Is Authentication

Authentication is proving who you say you are. There are three factors a system can ask for:

FactorWhat It IsExample
Something you knowKnowledgePassword, PIN, security question
Something you havePossessionPhone, security key, smart card
Something you areBiometricFingerprint, face, iris

Two-factor authentication (2FA) requires two different factors from that list. Multi-factor authentication (MFA) requires two or more. The terms are mostly used interchangeably.

Why Passwords Alone Aren't Enough

ProblemHow 2FA Helps
Password stolen in breachAttacker still needs second factor
Password guessedSecond factor blocks access
Phishing captures passwordWithout second factor, login fails
Keylogger records passwordCan't capture hardware token
Shoulder surfingSecond factor changes constantly

2FA means a stolen password is no longer enough on its own. That alone is most of the point.

Types of Two-Factor Authentication

Ranking by Security

TypeSecurityConvenienceRecommendation
Hardware security keyExcellentModerateBest choice for critical accounts
Authenticator appVery goodGoodGreat for most accounts
Push notificationGoodExcellentGood balance
SMS/Text messageFairExcellentBetter than nothing
Email codePoorGoodAvoid if possible

Hardware Security Keys

Small physical devices that plug into a USB port or tap on a phone over NFC. They use the FIDO2 / WebAuthn standards.

KeyPriceConnectionNotes
YubiKey 5 NFC$50USB-A + NFCMost popular
YubiKey 5C$55USB-CFor newer devices
Google Titan$30-35USB + NFC/BluetoothGood value
Solo Keys$25-40USB-A or USB-COpen source

Best practices for hardware keys:

DoDon't
Buy two keys (backup)Rely on single key
Register both on all accountsLose track of which accounts use it
Store backup key securelyKeep both keys together
Start with most critical accountsTry to do everything at once

Authenticator Apps

Apps that generate time-based one-time passwords (TOTP):

AppPlatformCloud BackupNotes
Google AuthenticatoriOS, AndroidYes (Google account)Simple, widely compatible
Microsoft AuthenticatoriOS, AndroidYes (Microsoft account)Good for Microsoft ecosystem
AuthyiOS, Android, DesktopYes (encrypted)Best backup/sync options
1PasswordAll platformsYes (with subscription)Integrated with password manager
AegisAndroidManual exportOpen source, local only

Setting up an authenticator app:

  1. Account settings > Security > Enable 2FA.
  2. Choose "Authenticator app".
  3. Scan the QR code with your app.
  4. Enter the 6-digit code to verify.
  5. Save the backup codes in your password manager. Do this now, not later.

SMS and Phone-Based 2FA

TypeHow It WorksVulnerability
SMS codeText message with codeSIM swapping, interception
Voice callAutomated call reads codeSIM swapping, voicemail hacking
Push notificationApprove on phonePush fatigue attacks

SMS vulnerabilities:

AttackHow It Works
SIM swappingAttacker convinces carrier to transfer your number
SS7 attacksExploit phone network vulnerabilities
Voicemail hackingAccess codes left as voicemail
InterceptionGovernment or sophisticated attackers

SMS is still better than no 2FA at all. But use an authenticator app when the service offers one.

Account-Specific 2FA Setup

High Priority Accounts

Account TypeRecommended 2FAWhy Critical
Primary emailHardware key or authenticatorGateway to all account recovery
Password managerAuthenticator appProtects all other passwords
Bank/FinancialWhatever they offerDirect financial access
Cloud storageAuthenticator appMay contain sensitive files

Setting Up 2FA on Major Services

ServiceWhere to FindBest Option Available
GoogleSecurity > 2-Step VerificationHardware key, Authenticator
AppleApple ID > Sign-In and SecurityTrusted devices, Hardware key
MicrosoftSecurity > Two-step verificationMicrosoft Authenticator
FacebookSecurity and Login > Two-FactorAuthenticator app
AmazonLogin & Security > Two-StepAuthenticator app
Twitter/XSecurity > Two-factorAuthenticator (not SMS for free)

Backup Codes

When you enable 2FA, most services hand you a list of backup codes. These are one-time passwords for the day your phone falls in a lake.

Managing Backup Codes

DoDon't
Save in password managerScreenshot on phone
Print and store securelyEmail to yourself
Note which ones you've usedForget they exist
Generate new ones periodicallyShare with others

What If You Lose Access to 2FA

SituationSolution
Lost phone with authenticatorUse backup codes
Backup codes also lostContact account support
Hardware key lostUse backup key or backup codes
All methods lostAccount recovery (difficult)

Always have at least two recovery paths configured before you need them.

Passkeys

Passkeys are a newer standard built on FIDO2 / WebAuthn that replaces passwords entirely. The big platforms (Apple, Google, Microsoft) all support them and sync across devices:

FeatureHow It Works
Biometric unlockFace or fingerprint on your device
Device-basedPrivate key stored on your device
Phishing resistantCan't be tricked into fake sites
No password to rememberYour device handles authentication

Current Passkey Support

ServicePasskey Support
GoogleFull support
AppleFull support
MicrosoftFull support
AmazonPartial support
Many banksComing soon

Should You Use Passkeys

SituationRecommendation
Tech-savvy, single ecosystemYes, start using passkeys
Multiple devices, different ecosystemsWait for better cross-platform
Shared accountsNot yet suitable
Confused by the conceptStick with password + 2FA

Common Authentication Mistakes

MistakeWhy It's DangerousBetter Practice
Same 2FA method everywhereSingle point of failureVary methods, have backups
Not saving backup codesLocked out if 2FA failsStore in password manager
Only SMS-based 2FAVulnerable to SIM swapUse authenticator app
Approving unknown push notificationsAttacker gains accessVerify before approving
Sharing 2FA codes with "support"Phishing for full accessNever share codes

Push Notification Fatigue Attacks

The attacker has your password. They log in, again, and again, and again. Each attempt fires a push notification at your phone. Eventually you tap "approve" by reflex or by accident. The 2022 Uber breach started exactly like this.

Attack StepWhat Happens
Attacker has your passwordFrom breach or phishing
Repeated login attemptsYou get many notifications
Exhaustion or accidentYou approve one
Account compromisedAttacker is now logged in

Defense:

DoDon't
Read each notification carefullyApprove reflexively
Check time and locationApprove if you're not logging in
Report suspicious activityIgnore repeated prompts
Consider switching to TOTPIf push fatigue is a risk

Account Recovery Planning

Recovery Method Comparison

MethodSecurityConvenienceRecommended
Backup security keyExcellentModerateYes, for important accounts
Backup codes in vaultVery goodGoodYes, always save these
Recovery email (secured)GoodGoodYes, but secure that email too
Recovery phoneFairExcellentSIM swap risk
Security questionsPoorGoodUse random answers

Creating a Recovery Plan

  1. Primary: password plus authenticator app.
  2. First backup: backup codes in the password manager.
  3. Second backup: a second security key, stored separately.
  4. Emergency recovery: a recovery email, also protected with 2FA.

Biometric Authentication

Types and Security

BiometricSecurityConvenienceSpoofing Risk
FingerprintGoodExcellentModerate
Face recognitionGood to excellentExcellentVaries by implementation
Iris scanExcellentModerateLow
VoiceFairGoodHigher with AI

When to Use Biometrics

AppropriateBe Cautious
Device unlockSole authentication method
Confirming purchasesHigh-security requirements
Password manager accessCrossing borders
Convenience layerWhen coercion is possible

Biometrics can be compelled. Someone can hold a phone to your face or press your finger on a sensor. PINs and passwords require active cooperation. In US case law that distinction has had real legal weight at borders.

Enterprise vs. Personal Authentication

If you work for an organization:

Personal AccountsWork Accounts
You control 2FA setupCompany policy dictates
Use personal authenticatorMay require specific app
Hardware keys are yoursCompany may provide keys
Backup codes are yoursFollow company procedures

Keep work and personal separate:

DoDon't
Separate authenticator for workMix personal and work 2FA
Follow company security policiesUse personal key for work
Report work account issues to ITTry to fix work accounts yourself

Key Takeaways

  1. Enable 2FA wherever it's offered. It's the single most effective step you can take.
  2. Hardware keys win, then authenticator apps, then SMS. In that order.
  3. SMS is better than nothing. Use it where it's the only option.
  4. Save the backup codes. In the password manager, before you need them.
  5. Buy two hardware keys. Register both. Store the backup somewhere else.
  6. Protect your primary email first. It's the recovery path for everything else.
  7. Push fatigue is real. Never approve a prompt you didn't trigger.
  8. Plan for recovery. Multiple paths for the accounts that matter.
  9. Passkeys are arriving. Start using them where they're stable.
  10. Biometrics are a convenience. Pair them with a PIN, not against one.

Next Steps

Continue to 04-phishing.md for the attack 2FA was designed to defeat: the lookalike login page, the urgent text, the fake CEO email.