Skip to content

fix(sessions): run login hooks when a recovery session's restriction lifts - #621

Merged
Bccorb merged 2 commits into
mainfrom
fix/recovery-session-hooks
Nov 27, 2026
Merged

Bccorb merged 2 commits into
mainfrom
fix/recovery-session-hooks

Conversation

@Bccorb

@Bccorb Bccorb commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

A recovery session now runs the post_login and pre_token login hooks when its restriction lifts, after the user enrolls a passkey or authenticator app.

  • The pre_token claims are kept on the session from then on.
  • If a hook refuses, POST /webauthn/register/finish and POST /totp/enroll/verify answer 403 login_denied or 503 login_hook_unavailable, and the recovery session chain is revoked. The new factor is kept, so the user signs in with it, and that sign-in runs the hooks.
  • The restriction is lifted on the head of the session's refresh chain, so a refresh that rotates the session while the hooks run carries the result forward instead of leaving a restricted successor.
  • Break-glass administrators still skip the hooks.

@Bccorb
Bccorb force-pushed the fix/recovery-session-hooks branch from 32fd915 to 0f6a23a Compare November 27, 2026 04:02
@Bccorb
Bccorb deleted the branch fix/step-up-earlier-factors November 27, 2026 06:06
@Bccorb Bccorb closed this Nov 27, 2026
@Bccorb Bccorb reopened this Nov 27, 2026
@Bccorb
Bccorb changed the base branch from fix/step-up-earlier-factors to main November 27, 2026 06:09
@Bccorb
Bccorb force-pushed the fix/recovery-session-hooks branch from 0f6a23a to eaffa2a Compare November 27, 2026 06:10
@Bccorb
Bccorb merged commit 564a023 into main Nov 27, 2026
7 checks passed
@Bccorb
Bccorb deleted the fix/recovery-session-hooks branch November 27, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant