2FA done right: authenticator apps and hardware keys
Two-factor authentication (2FA) adds a second verification step alongside your password. Even if someone knows your password, they also need the second factor.

2FA done right: authenticator apps and hardware keys
Two-factor authentication (2FA) adds a second verification step alongside your password. Even if someone knows your password, they also need the second factor.
Not all 2FA is equally strong. This article explains the differences.
Who this guide is for
This guide is for almost every reader with online accounts, especially if you:
- still rely on passwords alone for important logins
- use SMS codes and assume that means you are fully covered
- want the highest-impact security step after getting a password manager
This is step 2 in the normal baseline. If you haven’t set up a password manager yet, do that first.
What you gain, and what it costs
What you gain:
- much lower risk from leaked or reused passwords
- better protection for your email, password manager, and cloud accounts
- a clearer understanding of when TOTP is enough and when hardware keys are worth it
What it costs:
- logins take slightly longer
- you need to store backup codes properly
- stronger 2FA options add a bit of setup work and, for hardware keys, extra cost
When this is overkill
The basics here are not overkill for most readers. What becomes overkill is buying hardware keys for every account before you have even enabled TOTP on your important ones. Start with authenticator-based 2FA on your critical accounts, then add keys where they matter most.
SMS 2FA: avoid it where possible
SMS 2FA — a code via text message — is better than nothing but has serious weaknesses.
SIM swapping: An attacker convinces your carrier to transfer your number to a new SIM card in their possession. After that, they receive your SMS codes.
SS7 vulnerabilities: The signalling network between carriers has known weaknesses. The EU cybersecurity agency ENISA describes attacks that used SS7 to intercept and redirect SMS banking codes.
Carrier access: SMS has no end-to-end encryption. In the Netherlands, a public prosecutor can order communication through a provider to be intercepted when investigating serious crime.
Use SMS 2FA only when there is no better alternative available.
TOTP: time-based codes via an app
TOTP (Time-based One-Time Password) generates a code, usually six digits, that normally changes every 30 seconds. The calculation happens locally on your device: no server connection is needed, as long as your device’s clock is about right.
TOTP is not phishing-resistant: you type the code yourself, so a fake site can pass it on to the real one. It does stop someone who only has your leaked password.
Aegis Authenticator
Open-source, local storage, encrypted backup file. Available via F-Droid and Google Play.
This is the recommendation for most users. You can create an encrypted export as a backup and store it safely.
Less suitable: Google Authenticator (saves your codes in your Google account when you sign in; choose “Use without an account” to avoid that), Microsoft Authenticator (codes work offline, but its optional backup runs through your Microsoft account, iCloud on iOS, and from January 2027 Google One on Android), Authy (optional backup to Twilio’s cloud; the desktop apps reached end of life in 2024).
iOS user? Aegis is Android-only. On iOS, use 2FAS (open-source, free, App Store): codes are stored on the device, with a password-protected export file. Its iCloud sync is optional, even though the app recommends leaving it on. Tofu (open-source, free, App Store) is the smaller option: it works offline but has no export, and you can only move your accounts through a password-protected iPhone backup on a computer. The App Store version dates from 2021.
Setting up 2FA
- Install Aegis
- Go to the 2FA settings for the service you want to secure
- Scan the QR code with Aegis
- Enter the generated code to confirm
- Save the backup codes the service gives you — on paper or in an encrypted file
Hardware keys: the strongest option
A hardware security key is a physical device you plug in via USB or tap via NFC. When logging in, you press the button on the key — proof that you are physically present.
Hardware keys are resistant to phishing: a login is tied to the site’s domain. The browser passes the domain to the key, so a login made on a fake site is useless on the real one.
YubiKey 5 NFC
A widely supported hardware key. Supports multiple protocols (FIDO2, WebAuthn, OTP). Works via USB-A and NFC. If you have a USB-C-only port and no adapter, choose the YubiKey 5C NFC instead.
Works with services such as Google, GitHub, Proton, Bitwarden, and more.
Price: check current price at yubico.com
Nitrokey 3
Open-source alternative to YubiKey. The firmware is public and can be updated, which YubiKey firmware cannot: an advantage for those who distrust closed firmware.
Price: check current price at nitrokey.com
Which one do you choose?
For most users: YubiKey 5 NFC, for its wide support and its USB and NFC connections. On a phone, test it first: on GrapheneOS, forum reports say security keys depend on sandboxed Google Play.
For those where open-source firmware is a hard requirement: Nitrokey 3.
Always buy two keys — one as primary, one as backup. If you lose your only key and have no recovery codes or other method, you can lose access to your accounts.
Is this for you? A hardware key is more than most people need: TOTP in an authenticator app is already a strong, manageable choice. Keys make sense if you are likely to face targeted phishing, such as journalists, lawyers, politicians, and people who manage access to other people’s systems.
Backup codes: the part everyone forgets
Most services that support 2FA offer backup or recovery codes. Some give them during setup; with others, such as Google, you create them yourself. Store them:
- Not in the app on your phone — if your phone is gone, the codes are gone too
- Not in an unencrypted online document: anyone who gets into that account has your codes too
- Do: printed in a secure location, or in an encrypted file on an offline medium
Which services support hardware keys?
Hardware keys (FIDO2/WebAuthn) are supported by Google, GitHub, Proton, Bitwarden, Dropbox, and many other international services. On some, such as GitHub and Dropbox, you first set up an app or SMS, then add the key.
In the Netherlands, it differs per service. DigiD lists no hardware keys and no TOTP among its login methods, so Aegis doesn’t work there: use DigiD’s own app or its SMS verification. Banks have their own login systems too, such as ABN AMRO’s e.dentifier reader.
How to start, step by step
- Install Aegis (Android) or 2FAS (iOS)
- Move your most critical accounts to TOTP: email, password manager, cloud storage. If you are self-employed, start with email and accounting software (such as Moneybird or Exact). DigiD has no TOTP: use the DigiD app there.
- Save backup codes
- Where you already use SMS 2FA: add TOTP first, test it, and only then remove SMS
- Consider a hardware key as an optional extra step for accounts that support it — steps 1–4 are the priority
Next step
Go further
- Security as a habit — building a durable baseline once passwords and 2FA are covered
Reviews
- Aegis review — open-source TOTP app for Android
- YubiKey vs Nitrokey review — hardware security keys
- KeePassXC review — password manager with 2FA support