Prompt
How do I make account recovery work with passkeys?
Latest observation
Account recovery with passkeys works best when you treat recovery as a separate, high-trust flow from normal sign-in.
Key idea
A passkey is great for authentication, but if a user loses all their devices, you still need a way to prove identity and regain access. So you should build multiple recovery paths, not rely on a passkey alone.
Recommended recovery options
1. Backup sign-in methods
Let users add at least one of these:
- another passkey on a second device
- a recovery code
- email verification
- phone/SMS as a fallback
- a trusted support process for high-risk cases
Best practice: encourage users to register more than one passkey during setup.
2. Recovery codes
Give users a set of one-time backup codes they can store offline.
- Generate them at account setup
- Show them once
- Allow regeneration if needed
- Mark each as single-use
This is one of the simplest and safest recovery methods.
3. Re-authentication through an existing device
If the user still has one signed-in device:
- allow them to approve recovery from that device
- require a passkey or device unlock on that device
- then let them register a new passkey
This is often the cleanest UX.
4. Verified email or phone
You can use email or phone to start recovery, but don’t make it the only control for high-value accounts.
- Email link for low/medium risk
- Add rate limits and expiring tokens
- Consider step-up verification before allowing a new passkey to be added
5. Manual or support-assisted recovery
For sensitive accounts, have a support flow:
- identity verification
- waiting period
- alerts to existing contact methods
- revoke old authenticators before issuing new ones
This should be a last resort.
A good recovery flow
A common pattern is:
- User selects “Can’t use my passkey?”
- They choose a recovery option:
- backup code
- email link
- approved device
- support flow
- After successful recovery, require them to:
- register a new passkey
- optionally add another backup method
- Revoke lost/stolen credentials if needed
Important security rules
- Don’t use passkeys as the only recovery mechanism
- Don’t let email alone replace a passkey for high-value accounts
- Require step-up authentication before changing recovery settings
- Alert the user when recovery starts
- Log and rate-limit recovery attempts
- Provide a grace period before permanently removing old authenticators
- Make recovery codes truly one-time-use
UX tips
- Ask users to add a second passkey during onboarding
- Show a clear “Recovery” section in account settings
- Explain what happens if they lose all devices
- Provide printable/downloadable backup codes
- Keep the flow short, but make high-risk actions explicit
Practical recommendation
If you want a solid default setup:
- Primary login: passkey
- Secondary recovery: backup codes + verified email
- Best recovery: another passkey on a second device
- Fallback: support process for edge cases
If you want, I can also sketch:
- a recommended recovery architecture,
- a sample user flow, or
- an implementation approach with WebAuthn/passkeys.