A secure account recovery flow does four things. It asks for proof that is independent of the lost authenticator, it limits how long a recovery code can be used, it never reveals whether an account exists, and it ends by revoking whatever an attacker may still hold. Updated Nov 22, 2026: the NIST and OWASP requirements below were re-read on that date.
A person loses a phone, replaces a laptop or finds that an email account has been taken over. The recovery screen now decides whether the legitimate owner gets back in, and whether an attacker can take the account instead. That is why recovery is a separate security ceremony and not a shorter login.
Map the ways a person can prove control
NIST SP 800-63B-4, section 4.2 recognizes four broad recovery methods: saved recovery codes, issued recovery codes, recovery contacts and repeated identity proofing. A service can also use an application-specific method, such as interaction with a support agent, but NIST requires that choice to rest on a documented risk analysis.
That list is a design prompt. Write down every recovery route your product actually offers, including customer support. Then record what evidence each route accepts and what level of account it can restore.
What NIST requires depends on the account. The table summarizes section 4.2 as of Nov 22, 2026.
| Account type | What recovery must require |
|---|---|
| Never identity-proofed (including accounts limited to AAL1) | A saved recovery code, an issued recovery code or a recovery contact |
| Can authenticate at AAL2 | One of: two recovery codes obtained by different methods; one recovery code plus a single-factor authenticator still bound to the account; repeated identity proofing |
| Can authenticate at AAL3, proofed at IAL1 or IAL2 | Same as AAL2 |
| Can authenticate at AAL3, proofed at IAL3 | A biometric comparison against the sample from the original on-site proofing session; the provider may also require the original evidence |
The practical reading: a high-value account should not fall back from two strong factors to one email link. Whatever the route, NIST requires that every recovery triggers a notification.
Give people a second path before they need it
Recovery is safer when people prepare while they still have access. NIST recommends encouraging subscribers to keep at least two separate means of authentication.
Do not bury backup setup in a security page nobody sees. Offer it after enrollment, after a successful sign-in on a new device, and when a user removes an authenticator. Good options include an additional passkey, a second hardware key or an offline recovery code.
This complements a careful passkey recovery design. A synced passkey may survive a device change, but its cloud account can have a recovery process of its own. Device loss and account takeover are different failure cases.
Make a recovery code act like a secret
A recovery code should not behave like a permanent support number. For saved codes, the same section says the code must hold at least 64 bits from an approved random bit generator, be stored by the service in hashed form, be throttled like any other authenticator, and be invalidated after use. The service must then issue a replacement, and issuing a replacement also triggers a recovery notification.
Issued codes (sent to a postal, email, text or voice address the user chose earlier) carry hard lifetimes:
| Delivery channel | Maximum validity (NIST SP 800-63B-4) | Same code sent to a recovery contact |
|---|---|---|
| Text message or voice | 10 minutes | up to 24 hours 10 minutes |
| 24 hours | up to 48 hours | |
| Postal, contiguous United States | 21 days | not stated; the 24-hour extension applies to every channel, so up to 22 days |
| Postal, outside the contiguous United States | 30 days | up to 31 days |
The contact column is arithmetic on NIST’s rule that validity “MAY be extended by 24 hours” for recovery contacts, which the standard illustrates with the text-message case. An issued code needs at least six decimal digits (or equivalent) from an approved random generator. A new recovery address must be verified with a confirmation code before it is accepted, and the service must let a subscriber hold at least two recovery addresses. If you support recovery contacts, NIST says to let people view and manage them and to send a reminder annually.
For a product team, this means the code record needs a state machine: created, delivered, attempted, consumed, expired or revoked. Logging only a generic “password changed” event hides the part of the flow that needs investigation.
Do not reveal whether an account exists
A forgot-password form can become a directory of customers. The OWASP Forgot Password Cheat Sheet says to return the same message for existing and non-existing accounts and to keep response time uniform, for example by running the same logic or using asynchronous calls instead of a quick exit.
The service also needs limits on automated submissions. Per-account rate limits, a CAPTCHA or other controls can stop an attacker from flooding someone’s inbox or phone. Do not lock an account merely because a reset was requested: OWASP says to make no account change until a valid token is presented, and that lockout in response to forgotten-password attempts lets anyone deny access to a known username.
The visible message can stay calm: “If an account matches those details, we’ll send recovery instructions.” The backend should still record the request and its abuse signals.
Separate password reset from compromised-account recovery
A routine forgotten password and a suspected takeover need different endings. OWASP notes that a password reset alone may leave an attacker with an active session, or with changed recovery information or MFA methods.
For a suspected compromise, OWASP adds two rules that are easy to miss:
- Do not rely solely on recently added or changed recovery information. Use independent, previously established evidence, such as saved recovery codes.
- Do not automatically restore superseded recovery addresses or phone numbers, since they may have been replaced because they were lost or compromised. Review them with the verified owner.
Then invalidate existing sessions and outstanding reset links and unused recovery codes, suspend authenticators identified as compromised, remove unauthorized changes, and notify through every registered address that remains safe to use.
This is where audit-log design matters. The log should show who initiated recovery, which method succeeded, which authenticators changed and when old sessions stopped working. It should avoid storing the secret itself. If the account also holds long-lived API grants, refresh-token revocation belongs on the same checklist.
Notify without making the notification the only defense
NIST requires an account-recovery notification in every case. The notice helps the owner catch a fraudulent recovery, but it arrives after a sensitive action has started or completed.
NIST requires support for at least two notification addresses per account. Notices go to all of them except postal addresses, which are used only when no other address exists, when the recovery is at AAL3, or when the only other address is the one that just received an issued recovery code. Include the time, the action that changed and a clear way to report an unauthorized event. Avoid putting live recovery links, codes or sensitive account data in the message.
A worked check: which scenarios meet the AAL2 rule
The table below applies NIST’s AAL2 recovery rule to the failure cases a team should test. It is a hypothetical product that issues saved codes, sends email codes and keeps one passkey per device. The outcomes follow the requirement list above; the product is invented for illustration.
| Scenario | Proof the user can present | Meets the AAL2 rule? |
|---|---|---|
| Lost phone, still holds a laptop passkey | Passkey (single-factor authenticator bound to the account) plus an email code | Only if the passkey counts as single-factor in your design and the email code is a recovery code; one saved code plus the passkey also qualifies |
| Lost every authenticator, kept the printed saved code | Saved code only | No, a second code from a different method is needed (for example an email code) |
| Lost every authenticator, no saved code | Email code only | No; fall back to repeated identity proofing if the account was proofed, otherwise the account cannot be recovered at AAL2 |
| Email address changed 48 hours ago by an attacker | Email code sent to the new address | Not as sole evidence; OWASP says not to rely on recently changed recovery information |
| Saved code replayed after use | Same saved code again | No; used codes must be invalidated and a new one issued |
Recovery will always add friction. The goal is to place that friction where it protects ownership, while giving prepared users a reliable second route before an emergency.
Reporting & Sources
Last checked Nov 22, 2026.





