Skip to content

fix(auth): a sign-out stays signed out when a running request saves the session back - #76

Merged
dskripchenko merged 1 commit into
mainfrom
fix/ended-session-revival
Oct 14, 2026
Merged

dskripchenko merged 1 commit into
mainfrom
fix/ended-session-revival

Conversation

@dskripchenko

Copy link
Copy Markdown
Owner

Found on the printable stand with RP-initiated logout (1.51.0): the sign-out at Keycloak came back to /admin/login signed in.

Trace: manifest/menu/status were in flight with the session when auth/logout invalidated it; they finished afterwards, Laravel saved the session back under the old id and returned the old cookie. Latent before 1.51 (the SPA stayed on its login page, the next F5 was signed in again).

  • Auth\EndedSessions: the sign-out remembers the ended session id (sha256, cache, session lifetime); a request carrying it is signed out and gets a fresh session.
  • Checked in AdminAuth before the public-action exclusion (bootstrap) and in BootstrapBuilder (the shell's inline bootstrap does not pass AdminAuth) — no host config change needed.
  • Cache down → reported, the check is skipped.
  • Tests: a stored signed-in session that comes back after its id was ended → guest bootstrap, 401 on the API, the stored session destroyed; a sign-out records the id; cache down. Three of them fail without the fix.

🤖 Generated with Claude Code

…he session back

A request in flight with the session at the sign-out saved it back under
the old id and returned the old cookie: the next page load was signed in
again (seen on the stand once the sign-out at the provider reloads the
page). The sign-out now remembers the ended id in the cache for the
session lifetime; AdminAuth (before the public actions) and the
BootstrapBuilder (the shell) sign such a request out and give it a fresh
session.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@dskripchenko
dskripchenko merged commit 70b3876 into main Oct 14, 2026
12 checks passed
@dskripchenko
dskripchenko deleted the fix/ended-session-revival branch October 14, 2026 13:00
@dskripchenko dskripchenko mentioned this pull request Oct 14, 2026
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