Passwords leak. Two-factor authentication (2FA) adds a second check, usually a six-digit code from an app, a text message, or a physical security key. A thief with your password still can't get in.

The methods aren't equal. SMS codes are the weakest, because SIM-swap fraud lets attackers move your number to their phone, and SMS also ties the account to a real-world identity. App-based codes (TOTP), from apps like Aegis or the TOTP feature in KeePassXC, are better and don't need a phone number. Hardware keys using FIDO2 or WebAuthn are strongest, because they check the website's domain and won't answer a phishing site.

That last point matters on onion sites. A phishing mirror can ask you for a TOTP code and relay it to the real site in seconds, so TOTP doesn't stop live phishing. Many onion services use PGP-based 2FA instead: they encrypt a challenge to your key and you decrypt it. It's clunky, but it doesn't require a phone.

Keep backup codes somewhere safe. Losing the second factor locks you out as effectively as an attacker would.