Changelog
Modules

ReAuth

Step-up reauthentication for sensitive manage and passkey actions.

ReAuth (step-up) confirms the user's identity before sensitive mutations. It is included when you map Identity management (with antiforgery in the management map).

Schemes and header

PieceValue
Cookie schemeAuthEndpoints.ReAuth (5 minutes)
Bearer schemeAuthEndpoints.ReAuth.Bearer
HeaderX-AuthEndpoints-Reauth with reauthToken
PolicyReAuthPolicy (claim Reauth=true)

Routes

Mapped with management (facade under /identity):

MethodPathNotes
GET/manage/authMethodsAvailable step-up methods
POST/confirmIdentityExactly one proof; CSRF when mapped via management
POST/confirmIdentity/passkeyOptionsWebAuthn options for passkey step-up

ConfirmIdentity proof

Provide exactly one of:

  • password
  • twoFactorCode
  • twoFactorRecoveryCode
  • credentialJson (passkey assertion)

On success: ReAuth cookie for browser clients; reauthToken for API clients using the header.

Protecting host endpoints

builder.Services.AddCookieAuthEndpoints(); // or AddBearerAuthEndpoints — registers ReAuth schemes

app.MapPost("/billing/update", handler)
    .RequireAuthorization()
    .RequireReauth();

Typical client flow

  1. GET /identity/manage/authMethods
  2. Collect proof (password, 2FA, or passkey via /confirmIdentity/passkeyOptions)
  3. POST /identity/confirmIdentity
  4. Retry the sensitive action with ReAuth cookie and/or X-AuthEndpoints-Reauth

Where ReAuth is required

  • Manage 2FA / info mutations
  • Passkey add, rename, delete, and creation options
  • Any host endpoint with .RequireReauth()