Paul O'Brien everything email Subscribe

This post contains referral links. They're marked, and they never change the verdict. How I make money

Paul O'Brien
Paul O'Brien
· 13 min read
Updated 1 November 2026

How to Set Up a YubiKey for Email: Gmail, Outlook, Proton and Fastmail

A step by step guide to protecting your email with a YubiKey or other security key. How to add one to Gmail, Outlook, Proton (including Proton Pass) and Fastmail, when to use it as a passkey, and how to set up a spare so you never get locked out.

Jump to section
  1. What a Security Key Does
  2. Second Step or Passkey?
  3. Choosing a Key
  4. Step 1: Set a PIN on Your Key
  5. Step 2: Add Your Key to Gmail
  6. Step 3: Add Your Key to Outlook.com
  7. Step 4: Add Your Key to Proton Mail and Proton Pass
  8. Step 5: Add Your Key to Fastmail
  9. Using Your Key on a Phone
  10. Your Backup Plan
  11. If You Lose a Key
  12. If It Didn't Work
  13. Frequently Asked Questions
  14. The Bottom Line
Set up a YubiKey for email, with the Yubico logo

A security key such as a YubiKey is the best lock you can put on your email. It is a small USB or NFC device that you touch to sign in, and it simply will not work on a fake login page. This guide shows you how to add one to Gmail, Outlook, Proton and Fastmail, when to use it as a passkey, and how to set up a spare so you never lock yourself out.

I first wrote this page about using a YubiKey with Proton Pass. People kept asking how the same key works with their other accounts, so I have turned it into a full guide. Proton Pass is still covered in detail below. I checked every step against each provider’s own help pages in November 2026, but menus do move, so if a button has a slightly different name on your screen, look for the nearest match.

Short answer: buy two FIDO2 security keys. In each email account, open the security settings, find security keys or passkeys, add your first key, then add the second one straight away. Save the recovery codes somewhere offline. That’s it: from then on, a stolen password is not enough to get into your email.

Before you start:

  • Two keys that support FIDO2 (every current YubiKey does). One is your spare.
  • A computer with an up to date browser. Chrome, Edge, Firefox and Safari all work. Set-up is easiest on a computer, not a phone.
  • Your email password and access to any second step you already use, such as an authenticator app.
  • Pen and paper (or a printer) for recovery codes.
  • About ten minutes per account.

What a Security Key Does

When you sign in, the website asks your key to prove who you are. The key only answers if the request comes from the real web address it was registered with. A look-alike page, however convincing, gets nothing, because the address does not match. You do not type a code, so there is no code to steal.

Diagram. On the real site, accounts.google.com, touching the key signs you in. On a fake page, accounts-google.help, the key does not answer, so there is nothing to steal.
Real site or fake: the key checks the web address for you, which is something people are bad at doing when they are in a hurry.

That is why a key beats the other second steps. All of them are far better than a password alone, but they can be got round in ways a key cannot:

Bar chart comparing second steps. Text message codes are weakest, then authenticator app codes, then tap to approve prompts. A security key or passkey is strongest because it only works on the real site and needs the key in your hand.
Second steps compared: a security key or passkey is the strongest, because it only works on the real site and needs the key in your hand.
Second stepHow hard to get roundThe weak spot
Text message codeEasiestTexts can be redirected through a SIM swap, and a fake page can ask for the code
Authenticator app codeHarderA fake page can pass your code to the real site within seconds
Tap to approve on your phoneHarderPeople tap “Yes” just to make the prompts stop
Security key or passkeyHardestYou need the key with you, and losing it without a spare can lock you out

Email is worth this extra step because it is the key to everything else. Whoever controls your inbox can reset the passwords on your bank, shopping and social accounts. I go into this more in It’s not if your email gets hacked, it’s when.

Second Step or Passkey?

A security key can sign you in two ways, and the words providers use for them overlap, which confuses a lot of people.

Diagram of two ways one key can sign you in. As a second step: your password plus a touch of the key. As a passkey: the key's PIN plus a touch of the key, with no password to type.
Two ways to use one key: as a second step after your password, or as a passkey with its PIN and no password to type.
  • As a second step (also called two-factor or two-step verification): you type your password, then touch the key. Nothing is saved on the key itself.
  • As a passkey: the key holds a passkey for that account. You enter the key’s PIN, touch it and you are in, without typing a password. Each passkey uses one of the key’s storage slots.
ProviderKey as a second stepKey as a passkeyHow many keys
Gmail (Google)YesYesSeveral; Google doesn’t publish a limit
Outlook.com (Microsoft)YesYesSeveral
Proton Mail and Proton PassYesNo, a password is still neededUp to four
FastmailYesYesSeveral

Good to know: a passkey does not have to live on a YubiKey. Your phone, your Mac or Windows Hello and password managers such as Proton Pass can all hold passkeys too. The difference is that a passkey on a hardware key can’t be copied off it, and it works on any computer you plug it into. For your main email account, I like having both: a passkey on my phone for everyday use and two hardware keys as the backstop.

Choosing a Key

For email you only need FIDO2, which every model below supports. Pick the connector that fits the devices you use most.

Yubico rangeConnectorsBest for
Security Key seriesUSB-A with NFC, or USB-C with NFCMost people. It does FIDO2 and nothing else, which is all email needs, and it is the cheapest
YubiKey 5 seriesUSB-A, USB-C, USB-C with Lightning, NFC and tiny “Nano” versions that stay in the portPeople who also want authenticator codes stored on the key, or smart card and PGP features for work
YubiKey Bio seriesUSB-A and USB-CA fingerprint instead of a PIN. No NFC, so it won’t tap on a phone
  • USB-C with NFC is the safest choice today. It plugs into most laptops, iPads and Android phones, and taps on an iPhone.
  • Buy two of the same model, so either one works everywhere the other does.
  • Buy from Yubico or an authorised reseller, not a marketplace seller you don’t know. Prices change, so check there.
  • Newer keys hold more passkeys. Keys with Yubico’s 5.7 firmware (sold since mid 2024) hold up to 100 passkeys. Older ones hold 25. Firmware can’t be upgraded, so that number is fixed for the life of the key. As a second step, a key has no limit at all.

Other brands such as Google Titan, Feitian and Token2 work in exactly the same way, because the standard is open. I use YubiKeys, so that is what I describe here.

Get your YubiKeys. Yubico sells its keys on Amazon, which makes it easy to order two of the same model at once.

See YubiKeys on Amazon

Affiliate link: as an Amazon Associate I earn from qualifying purchases, at no extra cost to you.

Step 1: Set a PIN on Your Key

A PIN stops someone who finds your key from using it as a passkey. You only need to do this once per key, not once per account.

  1. Plug in the key. On Windows, open Settings then Accounts then Sign-in options then Security key then Manage. On a Mac, or for a few more options, install the free Yubico Authenticator app and open Passkeys.
  2. Choose to set a PIN and type one you will remember. It can be letters as well as numbers, at least four characters (six or more is better).
  3. Do the same on your spare key. Using the same PIN on both is fine and easier to remember.

If you skip this, most websites will ask you to create a PIN the first time you save a passkey to the key, so you won’t miss it.

Watch out: get the PIN wrong eight times in a row and the key locks. The only fix is a reset, which wipes every passkey on it, and you then have to add the key to each account again. This is one more reason to have a spare that is already set up.

Step 2: Add Your Key to Gmail

Google lets you save a passkey on the key, so you can sign in without your password. You can also add it as a second step only.

  1. On a computer, go to myaccount.google.com/security and sign in.
  2. Under How you sign in to Google, choose Passkeys and security keys. Google may ask for your password again.
  3. Select Create a passkey. When your browser offers to save it on this computer or phone, choose Use another device (sometimes shown as Security key or USB security key).
  4. Insert your key, type its PIN and touch it when it flashes.
  5. The key now shows in the list. Repeat steps 3 and 4 with your spare key.
  6. Back on the security page, open 2-Step Verification, select Backup codes and print or write down the codes.

Good to know: if you only want the key as a second step after your password, look for Use a security key on the same page. If you added a key to Google before May 2023, it was set up the old way. Google says you may need to remove it and add it again to turn it into a passkey.

Watch out: on a work or school Google Workspace account, your administrator controls which options appear. If you can’t see passkeys or security keys, ask them. Google’s Advanced Protection Programme, for people at higher risk, also needs two passkeys or keys, and after joining, a backup key becomes your main way back in.

Step 3: Add Your Key to Outlook.com

These steps are for a personal Microsoft account, the kind you use with Outlook.com, Hotmail or Live.com. Work and school accounts are just below.

  1. Go to account.microsoft.com/security and sign in.
  2. Choose Manage how I sign in (on some accounts this is called Advanced security options or Sign-in methods).
  3. Select Add a new way to sign in or verify, then Face, fingerprint, PIN or security key.
  4. When Windows or your browser asks where to save the passkey, choose Security key (or Use another device), then USB or NFC.
  5. Insert the key, type its PIN and touch it.
  6. Give it a name you will recognise, such as “Keyring key”. Then repeat with your spare.

Microsoft 365 work and school accounts

  1. Go to mysignins.microsoft.com/security-info.
  2. Select Add sign-in method, then Passkey or Security key.
  3. Follow the prompts to insert the key, enter its PIN and touch it. Add your spare the same way.

Good to know: Microsoft lets you remove the password from a personal account completely. I would only do that once two keys and the Microsoft Authenticator app are all working, so you have more than one way in.

Watch out: on a work account, your IT team decides whether security keys are switched on. If Security key or Passkey isn’t in the list, it isn’t something you can fix yourself; ask them to turn it on.

Step 4: Add Your Key to Proton Mail and Proton Pass

Proton uses your key as a second step after your password. One key protects every Proton service on that account: Mail, Pass, Drive, Calendar and VPN. Because Proton Pass signs in through the same account, adding a key here is the single best thing you can do to protect your password vault.

  1. Sign in at account.proton.me, open Settings then All settings, then Account and password.
  2. Under Two-factor authentication, turn on the Security key switch. Proton may ask for your password, and for your authenticator code if you already use one.
  3. Insert the key and select Continue. Leave Allow platform keys unticked so you register the physical key.
  4. Touch the key when your browser asks.
  5. Give it a name, such as “Blue YubiKey, desk drawer”, and select Continue.
  6. Repeat for your spare key. Then download your recovery codes when Proton offers them and keep them offline.

Next time you sign in, Proton asks for your password and then your key. If you have an authenticator app set up too, you can pick it instead from a tab on the same screen.

Using your key with Proton Pass on a phone

Proton’s guide says a key can be used in place of the code when you sign in to Proton Pass on a phone, either plugged in over USB or tapped over NFC. If Pass doesn’t pick the key up straight away, choose Use a different device, pick the type of key and tap or plug it in.

Good to know: you can add up to four security keys to a Proton account. Ticking Allow platform keys lets you add Windows Hello, Touch ID or Face ID as one of them, which is handy on a computer you always use. Proton Pass can also store passkeys for your other websites, but those live in your vault, not on the YubiKey.

Watch out: Proton lists three known snags. Tor Browser doesn’t support security keys. Safari sometimes shows an error because of a known bug: quit Safari completely and try again, or use another browser. And protonvpn.com doesn’t accept security keys, so sign in at proton.me. Also remember the key doesn’t replace your Proton password, which you still need.

Step 5: Add Your Key to Fastmail

Fastmail lets you use a key either way: as a second step after your password, or as a passkey to sign in without one.

As a second step

  1. Sign in on the web and open Settings then Privacy & Security.
  2. If you haven’t already, add a recovery phone number. Fastmail needs one before it turns on two-step verification.
  3. In Password & two-step verification, select Manage two-step verification, then Add verification device and choose a security key.
  4. Insert the key, touch it and give it a name. Add your spare the same way.
  5. Save the recovery code Fastmail gives you somewhere offline.

As a passkey

  1. In Settings then Privacy & Security, find Passkeys and select Create a passkey.
  2. When your browser asks where to save it, choose Security key or Use another device.
  3. Enter the key’s PIN, touch it and give the passkey a name. Repeat for your spare.

Good to know: Fastmail treats a passkey as two steps in one, so you won’t be asked for a second step when you use it. Your password keeps working alongside it, and still needs the second step. Mail apps such as Apple Mail or Thunderbird can’t use a security key, so they connect with an app password that you create in the same settings area. For more on Fastmail’s security, see my Fastmail security and privacy deep dive.

Using Your Key on a Phone

PhoneHow the key connectsTips
iPhone 15 and laterPlug in over USB-C, or tap over NFCHold the key flat against the top edge of the phone, near the camera, until it buzzes
Older iPhonesTap over NFC, or a Lightning keyNFC works on iPhone 7 and later
AndroidPlug in over USB-C, or tap over NFCNFC sits in the middle of the back on most phones; make sure NFC is switched on
iPadPlug in over USB-C or LightningiPads don’t read keys over NFC

Many people add a passkey on their phone as well, so they can sign in by face or fingerprint every day and keep the hardware keys for new devices and emergencies. That works well, as long as the phone is yours and locked.

Your Backup Plan

Losing access to your email is a bigger risk for most people than being hacked, so this part matters as much as the set-up.

Diagram of a backup plan. Your email in the middle, linked to four ways in: a main key on your keyring, a spare key kept at home, printed recovery codes and an optional authenticator app as a fallback.
A backup plan: a main key, a spare kept at home, printed recovery codes and an authenticator app as a fallback.
  • Register both keys on every account. A spare that was never added is no use.
  • Keep the spare somewhere else. Not on the same keyring: in a drawer at home, or with someone you trust.
  • Print or write down your recovery codes and keep them with your important papers. Don’t keep the only copy in the email account they unlock.
  • Decide on a fallback. An authenticator app is weaker than a key, but it is a way back in. I keep one on my main accounts. If you are at high risk, you may prefer keys and codes only.
  • Test the spare. Sign out, sign back in with the spare key, and make sure it works on each account.
  • Keep a list of which accounts each key is on. When you add a new account, add both keys.

If You Lose a Key

  1. Sign in to each account with your spare key, or your fallback.
  2. Open the same security settings you used above and remove the lost key. Your provider shows them by the names you gave them, which is why good names help.
  3. Buy a replacement, set its PIN and add it to every account, so you are back to two keys.

Without a spare or fallback, you will need a recovery code, or the provider’s account recovery process. That can take several days. With Proton, a password reset can also leave your older encrypted email unreadable unless you saved a recovery phrase or file. Someone who finds your key still needs your password, or the key’s PIN, to use it.

If It Didn’t Work

What happensWhat to try
Nothing happens when I insert the keyTouch the gold disc or the side of the key; it only answers when it flashes. Try another USB port, or plug it straight into the computer rather than a hub.
The browser keeps offering to save the passkey on my phone or computerLook for Use another device, Security key or More options in the browser’s pop-up.
It asks for a PIN I don’t knowThe key already has a PIN. Try the one you set before. If it locks, the key has to be reset, which wipes its passkeys.
Safari shows an error with ProtonQuit Safari fully (Safari then Quit Safari), reopen it and try again, or use Chrome, Edge or Firefox.
The phone won’t read the key over NFCTake off a thick case, hold the key still against the NFC spot for a few seconds and check NFC is on in Android settings.
Security keys aren’t offered on my work accountYour administrator has to switch them on.
Google won’t save a passkey on a key I added years agoRemove the old key from your Google Account and add it again as a passkey.
Tor Browser won’t use the keyTor Browser doesn’t support security keys. Use another browser for the sign-in.

Frequently Asked Questions

Does Proton Pass support YubiKey?

Yes. Proton accepts FIDO2 and U2F keys, including YubiKeys, as a second step on your Proton account, and that covers signing in to Proton Pass on the web, computer apps and phone apps.

Can I use one YubiKey for all my email accounts?

Yes. One key can be added to Gmail, Outlook, Proton, Fastmail and hundreds of other sites. As a second step there is no limit. As a passkey, the limit is the key’s storage: 100 on newer YubiKeys, 25 on older ones.

Do I need a YubiKey 5, or will the cheaper Security Key do?

For email, the Security Key series does everything you need. The YubiKey 5 only adds features most people never use, such as storing authenticator codes or smart card certificates.

What happens if someone steals my key?

They still need your password, or the key’s PIN if it holds passkeys. Sign in with your spare and remove the stolen key from each account.

Can I use Face ID or Windows Hello instead of a physical key?

Yes. These are passkeys or platform keys stored on your device, and they are just as hard to phish. The difference is that they stay on that device, while a hardware key works on any computer you plug it into. I use both.

Does a security key stop every kind of attack?

No. It stops stolen passwords and fake login pages, which are behind most email break-ins. It can’t help if malware takes over a computer that is already signed in, or if someone talks your provider’s support team into resetting the account. Keep your devices up to date and your recovery details current.

The Bottom Line

A security key takes about ten minutes per account and closes off the most common way email gets broken into. Buy two, set a PIN, add both to every email account you care about, and put the recovery codes somewhere safe. If you are choosing a new provider with strong security, see my Proton Mail review and my Fastmail review.

Disclosure: This article contains affiliate links for Proton, Fastmail and Amazon. If you sign up or buy through them, I may earn a commission at no extra cost to you. As an Amazon Associate I earn from qualifying purchases. I have no affiliate arrangement with Google or Microsoft. I only recommend services I personally use and trust.

Note: checked and updated 1 November 2026. Sources: Proton: set up 2FA with a security key, Proton: FIDO2 on mobile, Google: sign in with a passkey, Google: use a security key for 2-Step Verification, Microsoft: signing in with a passkey, Microsoft: register a passkey on a security key (work accounts), Fastmail: introducing passkeys, Yubico: 5.7 firmware.

Paul O'Brien

Paul O'Brien

I've spent over 25 years working hands-on with email, DNS and cloud infrastructure. I test email providers and privacy tools for real, then tell you what they're good at and where they fall short.

More about me

You're subscribed. New articles come by email, as I publish or every Thursday. Change how often

How often?
Nothing else, and I never share your email. Already subscribed? Sign in

Comments