Prompt
I need a secure recovery and device re-enrollment flow for passkey users. How should I design it?
Latest observation
Here’s a secure way to design recovery and device re-enrollment for passkey users. The core idea is:
- Do not “reset” the user’s identity casually
- Recover the account first, then re-establish trusted devices
- Use multiple independent recovery factors
- Treat re-enrollment as a high-risk action with step-up verification
1) Define the threat model first
Assume attackers may have:
- a stolen password fallback
- access to email or phone
- a lost/stolen device
- partial knowledge of the user’s personal data
- access to a synced passkey account on one device
Your flow should resist:
- account takeover via recovery
- unauthorized device addition
- silent deletion of existing passkeys
- recovery using only one weak factor
2) Recommended account structure
Model the account with these distinct states:
- Primary auth methods
- passkeys on trusted devices
- optionally a password, but do not rely on it alone
- Recovery methods
- recovery codes
- verified email + high-risk email link
- verified phone only as a backup, not sole recovery
- trusted contacts or support-assisted recovery for higher assurance
- Trusted devices list
- each device/passkey has a unique ID, enrollment time, last-used time, attestation/metadata if available
3) Recovery design principles
A. Recovery should not immediately grant full access
A recovery event should usually create a limited-access or pending state until the user proves control via stronger signals or waiting period.
Good pattern:
- User starts recovery
- System verifies recovery factors
- System allows login into a restricted session
- User can view security settings and enroll new passkeys
- Sensitive actions require additional step-up or delay
B. Separate “account recovery” from “device enrollment”
Don’t make “add a new passkey” available to anyone who can complete a weak recovery factor.
Instead:
- recovery unlocks the account
- re-enrollment of a new passkey is a separate step
- adding a new device should be logged and may trigger alerts to existing devices
C. Prefer existing trusted devices when available
If the user still has one passkey on a trusted device:
- use that to approve new device enrollment
- allow removal of old devices
- avoid recovery entirely unless necessary
4) A good recovery hierarchy
Use the strongest available path first:
Tier 1: Existing trusted passkey/device
- User signs in on any already-enrolled device
- Approve new device enrollment from the existing device
- Optionally require biometric/PIN + recent reauth
Tier 2: Recovery codes
- One-time backup codes generated at enrollment
- Require one code plus another factor if risk is high
- Mark codes as consumed and support revocation/regeneration
Tier 3: Verified email or phone + risk controls
- Send a recovery link or OTP
- Use device/risk checks:
- new IP / geo mismatch
- impossible travel
- known compromised phone number risk
- Consider a waiting period before high-risk changes
Tier 4: Support-assisted recovery
For high-value accounts:
- require identity verification
- use manual review
- impose a cooling-off period before allowing removal of existing passkeys or payout changes
5) Device re-enrollment flow
A secure pattern:
Step 1: User authenticates or recovers
- via existing passkey, recovery code, or approved recovery method
Step 2: Enroll new passkey
- Generate a challenge
- Use WebAuthn/passkey registration
- Bind the credential to the account and device metadata
Step 3: Verify and promote trust
- Mark new passkey as “trusted”
- Notify user on all existing channels
- If any old device still exists, prompt to review and remove unrecognized devices
Step 4: Optional confirmation window
For sensitive accounts:
- newly added device is usable for login
- but actions like deleting other passkeys, changing recovery factors, exporting data, or changing payout info require a 24–72 hour delay or extra verification
6) Prevent dangerous recovery shortcuts
Avoid:
- SMS-only account recovery
- email-only reset links with no risk controls
- allowing recovery to delete all existing authenticators instantly
- using KBA (“what is your mother’s maiden name”) as a primary recovery factor
- reusing the same factor for both account recovery and authorization of high-risk changes
7) Passkey-specific recommendations
A. Support multi-device passkeys
Since synced passkeys may exist across a user’s ecosystem:
- enumerate all known passkey credentials
- allow users to see and revoke them
- show device names, approximate enrollment time, and last used time
B. Handle lost device scenarios carefully
If a user loses a device:
- do not immediately remove it
- require recovery or another trusted device
- notify all remaining devices
- consider a grace period before deleting old credentials unless risk is low
C. New passkey creation should be user-initiated
Never silently create recovery passkeys. The user must explicitly complete enrollment.
8) Secure state machine example
You can implement the account in these states:
- Normal
- Recovery Pending
- Limited Access
- Trusted Re-enrolled
- Security Hold
- Support Review
Example transitions:
- Normal → Recovery Pending: user starts recovery
- Recovery Pending → Limited Access: recovery factor verified
- Limited Access → Trusted Re-enrolled: new passkey enrolled and confirmed
- Any state → Security Hold: suspicious signals detected
- Security Hold → Normal: manual review or waiting period completed
9) Notifications and auditability
You should notify on:
- recovery attempts
- successful recovery
- new passkey enrollment
- removal of any passkey
- changes to recovery factors
- login from new device
Log:
- timestamp
- IP/region/device info
- recovery method used
- credential IDs added/removed
- support agent actions
- risk scores and policy decisions
Make logs tamper-evident and retain them appropriately.
10) Step-up policies for sensitive actions
Require stronger proof for:
- deleting existing passkeys
- changing recovery email/phone
- adding payout methods
- changing password if password fallback exists
- disabling 2FA/passkeys
- exporting account data
Examples of step-up:
- existing passkey reauth
- recovery code + email confirmation
- biometric verification on a trusted device
- waiting period plus alert to existing devices
11) Practical recovery policy recommendation
A solid default policy is:
- If user has an existing passkey device: use it to add/revoke devices
- If not: require a recovery code or verified secondary channel
- If the account is high-risk/high-value: add waiting period and/or manual review
- Never allow a single weak factor to fully replace all passkeys immediately
12) UX guidance
Make it understandable:
- “Recover your account” vs “Add a new device”
- explain what each recovery method does
- clearly display when the account is in a limited state
- show “Your existing devices will be notified”
- give the user an emergency route if they lose everything
13) A simple secure flow you can adopt
Enrollment
- User signs in with passkey
- Prompt to generate recovery codes
- Offer to verify backup email/phone
- Register additional trusted device if desired
Lost-device recovery
- User selects recovery
- Verify recovery code or secondary factor
- Enter limited-access mode
- Require creation of a new passkey
- Notify all previous devices
- Optionally wait before allowing removal of old devices
14) If you want the highest assurance
For enterprise or high-value consumer accounts:
- require 2-of-3 recovery factors
- require support verification for credential reset
- enforce a 24–72 hour change freeze after recovery
- monitor for unusual behavior before allowing credential removal
If you want, I can turn this into:
- a concrete state machine/sequence diagram,
- a WebAuthn/passkey API design, or
- a policy matrix for low/medium/high-risk accounts.
Brands