Examples
Complete step-up (ReAuth)
Prove identity before a CSRF-protected manage or host action.
Sensitive manage mutations and any host endpoint with .RequireReauth() need a fresh ReAuth proof. Browser clients get the AuthEndpoints.ReAuth cookie (5 minutes). API clients can send header X-AuthEndpoints-Reauth with the reauthToken from confirm.
Assume a signed-in cookie session and CSRF for POST /confirmIdentity when mapped with management.
Steps
- Call the protected action (for example
POST /identity/manage/info). On missing ReAuth, expect401or403. GET /identity/manage/authMethodsto list available proofs.- Collect exactly one proof for
POST /identity/confirmIdentity:{ "password": "…" }{ "twoFactorCode": "…" }{ "twoFactorRecoveryCode": "…" }{ "credentialJson": "…" }after passkey options
- For passkey step-up:
POST /identity/confirmIdentity/passkeyOptions, runnavigator.credentials.get(…), then sendcredentialJson. POST /identity/confirmIdentitywith CSRF and one proof field.- On success, retry the protected action with the same session cookies. Send
X-AuthEndpoints-Reauthwhen the client storesreauthTokeninstead of relying on the ReAuth cookie.
Where ReAuth is required
POST /identity/manage/2faandPOST /identity/manage/info- Passkey add, rename, delete, and authenticated creation options
- Host endpoints that call
.RequireReauth()
See ReAuth for schemes, policy, and host wiring.