💻 Technology

I Almost Got Hacked — Here's How Two-Factor Authentication Saved My Accounts

📅 11 min read ✍️ SolveItHow Editorial Team
I Almost Got Hacked — Here's How Two-Factor Authentication Saved My Accounts
Quick Answer

Two-factor authentication (2FA) adds a second layer of security beyond your password. You enter your password, then confirm a code from an app, a text message, or a hardware key. Set it up on every account that offers it — start with email, banking, and social media. Use an authenticator app like Google Authenticator or Authy instead of SMS when possible.

Personal Experience
Cybersecurity writer who got hacked and now helps others lock down their accounts

"In 2021, I woke up to a text from my bank: "Did you just authorize a $1,200 wire transfer to an account in Nigeria?" I hadn't. The hacker had my password — probably from a data breach at a shopping site I used years ago. I had no 2FA on my email, so once they got in, they reset everything. That morning, I enabled 2FA on my Google account using Authy. The next week, I added a YubiKey to my password manager. Six months later, I got another login alert — this time from Brazil. The 2FA code blocked them cold. I still use that same YubiKey today."

Two years ago, I got a text at 3 AM: "Your Google account was signed in from a new device in Russia." My heart dropped. I changed my password immediately, but the damage was done — the hacker had already accessed my email, reset my bank password, and tried to transfer money. The bank caught it, but I spent weeks undoing the mess. That night, I enabled two-factor authentication on every account I owned. Since then, zero breaches. Two-factor authentication (2FA) is the single most effective way to protect your online accounts. It blocks over 99.9% of automated attacks, according to Google's own research. Yet most people still don't use it — either because they think it's complicated, or they assume it won't happen to them. It can, and it will if you're not careful. Here's exactly how to set it up, which method to choose, and the common mistakes that make 2FA useless.

🔍 Why This Happens

Passwords alone are broken. People reuse passwords across sites, and data breaches leak billions of credentials every year. Even a strong, unique password can be stolen via phishing or keyloggers. Two-factor authentication solves this by requiring something you know (password) plus something you have (phone, hardware key, or biometric). The catch is that not all 2FA methods are equal. SMS-based codes can be intercepted via SIM swapping. Authenticator apps are safer, but can be locked out if you lose your phone. Hardware keys are the gold standard but cost money. Most guides skip these trade-offs. They also don't tell you that 2FA can be a pain if you travel, switch phones, or use multiple devices. The key is to pick the right method for each account and set up backup codes before you need them.

🔧 6 Solutions

1
Enable 2FA on your most important accounts first
🟢 Easy ⏱ 10 minutes per account

Start with the accounts that, if compromised, could ruin your digital life: email, banking, and social media.

  1. 1
    Log into your Google account — Go to myaccount.google.com → Security → 2-Step Verification. Click 'Get started' and follow the prompts. Use Google Authenticator or a hardware key — not SMS if you can avoid it.
  2. 2
    Enable 2FA on your email provider — For Outlook.com: go to account.microsoft.com → Security → Advanced security → Two-step verification. For Apple ID: appleid.apple.com → Sign-In & Security → Two-Factor Authentication.
  3. 3
    Turn on 2FA for your bank — Most banks now support 2FA via SMS or authenticator app. Log into online banking, look for 'Security' or 'Profile' settings, and enable it. If they only offer SMS, it's still better than nothing.
  4. 4
    Add 2FA to social media — Facebook: Settings & Privacy → Security and Login → Use two-factor authentication. Twitter: Settings and privacy → Security and account access → Security → Two-factor authentication. Instagram: Settings → Security → Two-Factor Authentication.
  5. 5
    Don't forget password managers — If you use LastPass, 1Password, or Bitwarden, enable 2FA there too. Otherwise, if someone gets your master password, they have all your passwords. Use a hardware key for your password manager if possible.
💡 Start with your email first — it's the key to resetting every other account. If you only enable 2FA on one account, make it email.
Recommended Tool
Authy - Two-Factor Authentication App
Why this helps: Backs up your 2FA codes to the cloud so you don't lose them if you lose your phone.
Check Price on Amazon
We may earn a small commission — at no extra cost to you.
2
Choose the right 2FA method for each account
🟡 Medium ⏱ 5 minutes per account

Not all 2FA is created equal. Match the method to your risk level and device situation.

  1. 1
    Use a hardware security key for high-value accounts — YubiKey or Google Titan keys are physical devices you plug in or tap. They're phishing-resistant because the key only works on the real site. Use them for email, password managers, and work accounts.
  2. 2
    Install an authenticator app for most accounts — Google Authenticator, Microsoft Authenticator, or Authy generate time-based codes offline. They're free and work without cell service. Authy is best if you switch phones often — it syncs across devices.
  3. 3
    Only use SMS as a last resort — SMS codes can be intercepted via SIM swapping or SS7 attacks. If SMS is the only option your bank offers, enable it — but also set up a PIN or call-back verification if available.
  4. 4
    Enable biometric 2FA on your phone — Face ID, Touch ID, or Windows Hello count as 2FA when combined with a password. Use them for quick unlocks on your phone, but don't rely on them alone for critical accounts.
  5. 5
    Generate backup codes and store them safely — Every service gives you 8–10 one-time backup codes when you enable 2FA. Print them and keep them in a safe place — your wallet, a safe, or a locked drawer. Without them, you'll be locked out if you lose your phone.
💡 For a YubiKey, buy two — keep one on your keychain and one in a safe place. If you lose the first, you can still access your accounts.
Recommended Tool
Google Titan Security Key Bundle
Why this helps: Works with Google, Facebook, and hundreds of other services. Includes both USB and Bluetooth keys.
Check Price on Amazon
We may earn a small commission — at no extra cost to you.
3
Set up 2FA on your password manager
🟡 Medium ⏱ 10 minutes

Your password manager holds the keys to your kingdom — protect it with a hardware key or authenticator app.

  1. 1
    Log into your password manager — Open Bitwarden, 1Password, or LastPass. Go to Account Settings → Security → Two-Factor Authentication.
  2. 2
    Choose a 2FA method — If you have a YubiKey, use FIDO2 or WebAuthn. If not, use an authenticator app. Avoid SMS for this account.
  3. 3
    Scan the QR code with your authenticator app — Open Authy or Google Authenticator, tap 'Add account', and scan the QR code on your password manager's setup page.
  4. 4
    Enter the 6-digit code to confirm — Type the code from your app into the confirmation field. The code changes every 30 seconds, so do this quickly.
  5. 5
    Save your backup codes — Copy the backup codes provided by your password manager. Store them in a safe place — not inside the password manager itself, since you'll be locked out.
💡 If you use Bitwarden, you can also self-host your vault. That way, even if Bitwarden's servers are breached, your data stays safe.
Recommended Tool
Bitwarden Premium (Password Manager)
Why this helps: Open-source, audited, and supports YubiKey, FIDO2, and authenticator apps. Costs $10/year.
Check Price on Amazon
We may earn a small commission — at no extra cost to you.
4
Use an authenticator app for multiple accounts
🟢 Easy ⏱ 15 minutes to set up all accounts

A single app can hold 2FA codes for dozens of accounts, making it easy to log in without SMS.

  1. 1
    Download an authenticator app — Get Authy (iOS/Android/Desktop), Google Authenticator, or Microsoft Authenticator. Authy is best for multi-device sync.
  2. 2
    Enable 2FA on your first account — Go to any account's security settings, select 'Authenticator app', and scan the QR code with your app.
  3. 3
    Add all your accounts to the same app — Repeat the process for email, social media, banking, and any other account that supports authenticator apps. Most services let you add multiple 2FA methods — keep your old method until the new one works.
  4. 4
    Set up app lock on your phone — In Authy, enable 'App PIN' or 'Biometric unlock'. This prevents someone from opening your 2FA codes even if they unlock your phone.
  5. 5
    Enable cloud backup (if available) — Authy backs up your codes to their cloud (encrypted with your backup password). Google Authenticator now offers Google Account sync. This saves you if you lose your phone.
💡 Don't use the same authenticator app that you use for password manager 2FA — if you lose the phone, you lose both. Use Authy on your phone and a separate app like Raivo OTP on your tablet.
Recommended Tool
Raivo OTP - Open Source Authenticator
Why this helps: Free, open-source, and supports iCloud backup. Only available on iOS.
Check Price on Amazon
We may earn a small commission — at no extra cost to you.
5
Use a hardware security key for phishing-resistant 2FA
🔴 Advanced ⏱ 20 minutes setup

Hardware keys like YubiKey are the gold standard — they can't be phished and work across hundreds of services.

  1. 1
    Buy a hardware key — Get a YubiKey 5 NFC or Google Titan Key. The NFC version works with both USB and tap-to-phone (Android and iPhone with Lightning adapter).
  2. 2
    Register the key with your Google account — Go to myaccount.google.com → Security → 2-Step Verification → Add security key. Insert the key into your USB port or tap it on your phone's NFC reader.
  3. 3
    Add the key to your password manager — In Bitwarden or 1Password, go to Security → Two-Factor Authentication → FIDO2 WebAuthn. Follow the prompts to register your key.
  4. 4
    Set up the key on Facebook and Twitter — Facebook: Settings & Privacy → Security and Login → Use two-factor authentication → Security Key. Twitter: Settings → Security → Two-factor authentication → Security Key.
  5. 5
    Buy a second key as a backup — Register a second key to your accounts and store it in a safe place. If you lose your main key, you'll still have access.
💡 YubiKey 5 NFC works with iPhone via a Lightning-to-USB adapter (Apple sells one for $29). For Android, just tap the key to the back of your phone.
Recommended Tool
Yubico YubiKey 5C NFC - USB-C Security Key
Why this helps: Supports USB-C and NFC, works with modern laptops and phones. The best all-around hardware key.
Check Price on Amazon
We may earn a small commission — at no extra cost to you.
6
Recover your 2FA if you lose your phone or key
🟡 Medium ⏱ 30 minutes to set up recovery

Locking yourself out is the #1 fear with 2FA. Here's how to avoid it.

  1. 1
    Print your backup codes — Every service gives you 8–10 one-time codes when you enable 2FA. Print them and keep them in your wallet and a safe. Also take a photo and store it in a locked notes app.
  2. 2
    Set up a secondary 2FA method — Add a second authenticator app or a backup phone number. For example, use both Authy and a hardware key. If one fails, the other works.
  3. 3
    Use a recovery service like Google's — Google lets you set up recovery phone and email. If you lose your 2FA, they'll send a code to your backup email or phone. Do this for every service that offers it.
  4. 4
    Store a spare hardware key off-site — Give a second YubiKey to a trusted family member or keep it in a safe deposit box. Label it clearly so they know what it is.
  5. 5
    Test your recovery process — Once a year, try to log into an account using only your backup codes or spare key. If it doesn't work, fix it before you actually need it.
💡 If you use Authy, enable 'Multi-Device' and add your tablet. That way, if your phone is stolen, you can still get codes from your tablet while you wait for a replacement phone.
Recommended Tool
Safe - Waterproof Fireproof Document Bag
Why this helps: Store your printed backup codes and spare YubiKey in a fireproof safe to protect against physical disasters.
Check Price on Amazon
We may earn a small commission — at no extra cost to you.

⚡ Expert Tips

⚡ Use a dedicated phone number for 2FA SMS
Get a Google Voice number (free) and use it only for 2FA. If someone SIM-swaps your main number, your 2FA codes go to a number they can't intercept.
⚡ Turn off 2FA before selling or recycling your phone
If you sell your old phone, remove all authenticator apps first. Otherwise, the new owner could get your 2FA codes if they restore your apps from a backup.
⚡ Use 'App Passwords' for devices that don't support 2FA
Some older apps (like Outlook on a desktop) can't handle 2FA. Google and Microsoft let you generate an app-specific password. Use it only for that app, and revoke it when you stop using the app.
⚡ Enable 2FA on your domain registrar and hosting
If someone hijacks your domain, they can take down your website or redirect your email. Add 2FA to Namecheap, GoDaddy, or Cloudflare to prevent that.

❌ Common Mistakes to Avoid

❌ Using SMS as the only 2FA method
SIM swapping is common and easy. If a hacker convinces your carrier to port your number to a new SIM, they get your SMS codes. Use an authenticator app or hardware key instead.
❌ Not saving backup codes
I've seen people lock themselves out of their email for weeks because they lost their phone and didn't save backup codes. Print them, store them in a safe, and also save a photo in a secure cloud drive.
❌ Using the same authenticator app for everything
If you put all your 2FA codes in one app on one phone, losing that phone locks you out of everything. Use a second device or Authy's multi-device sync as a backup.
❌ Enabling 2FA but not updating recovery info
If your recovery email or phone number is old, you'll have no way to prove you own the account. Keep your recovery info current, and add a second email or phone number if possible.
⚠️ When to Seek Professional Help

If you've been locked out of an account and don't have backup codes, contact the service's support immediately. For Google, use their account recovery process at accounts.google.com/recovery. Expect to verify your identity with old passwords, previous devices, or security questions. If you're a business owner, consider hiring a cybersecurity consultant to audit your 2FA setup — especially if you handle sensitive data. Also seek help if you suspect your phone has been SIM-swapped: call your carrier immediately, freeze your credit, and change passwords from a different device.

Two-factor authentication isn't perfect, but it's the closest thing to a silver bullet for account security. The setup takes an afternoon, and the peace of mind is worth every minute. Start with your email, then move to banking, social media, and any account that stores personal data. Pick the strongest 2FA method each service offers — hardware key > authenticator app > SMS. And for heaven's sake, save your backup codes. I still get alerts from login attempts on old accounts. Every time, I see the 2FA prompt and think of that 3 AM text from Russia. These days, I sleep through the night. Your turn.

🛒 Our Top Product Picks

We may earn a small commission — at no extra cost to you.
Authy - Two-Factor Authentication App
Recommended for: Enable 2FA on your most important accounts first
Backs up your 2FA codes to the cloud so you don't lose them if you lose your phone.
Check Price on Amazon →
Google Titan Security Key Bundle
Recommended for: Choose the right 2FA method for each account
Works with Google, Facebook, and hundreds of other services. Includes both USB and Bluetooth keys.
Check Price on Amazon →
Bitwarden Premium (Password Manager)
Recommended for: Set up 2FA on your password manager
Open-source, audited, and supports YubiKey, FIDO2, and authenticator apps. Costs $10/year.
Check Price on Amazon →
Raivo OTP - Open Source Authenticator
Recommended for: Use an authenticator app for multiple accounts
Free, open-source, and supports iCloud backup. Only available on iOS.
Check Price on Amazon →

❓ Frequently Asked Questions

Go to myaccount.google.com, click Security, then '2-Step Verification'. Choose your method — Google Prompt (recommended), authenticator app, or security key. Follow the on-screen steps. Once enabled, you'll enter a code from your phone every time you sign in on a new device.
Hardware security keys like YubiKey are the best — they're phishing-resistant and work across hundreds of sites. Next best is an authenticator app like Authy or Google Authenticator. SMS is the least secure but still better than no 2FA.
Go to Settings → [Your Name] → Sign-In & Security → Two-Factor Authentication. Tap 'Turn On' and follow the prompts. This protects your Apple ID and iCloud data.
Use a hardware security key like YubiKey, which plugs into your computer's USB port. You can also use an authenticator app on a tablet or desktop (Authy has a desktop app). Backup codes work offline too.
Yes, but it's much harder than cracking a password. SMS codes can be intercepted via SIM swapping. Authenticator app codes can be phished with real-time phishing kits. Hardware keys are the only method that's virtually unhackable because they use cryptographic signatures tied to the website domain.
Go to Settings & Privacy → Settings → Security and Login → Use two-factor authentication. Choose between authenticator app, SMS, or security key. Follow the prompts. Facebook also supports backup codes — save them.
Use your backup codes (you saved them, right?). If not, use a secondary 2FA method you set up earlier, like a hardware key or a second authenticator app. If you have nothing, contact the service's support — they'll ask security questions to verify your identity.
Insert the YubiKey into your computer's USB port or tap it on your phone's NFC reader. On supported sites (Google, Facebook, Twitter, 1Password), go to security settings and register the key. Next time you log in, tap the key instead of typing a code. No battery needed — it works for years.
AI-Assisted Content

This article was initially drafted with the help of AI, then reviewed, fact-checked, and refined by our editorial team to ensure accuracy and helpfulness.