Skip to content

Make gateway auth logout clear session state - #5

Merged
codeandsolder merged 6 commits into
mainfrom
fix/unified-auth-logout
Aug 28, 2026
Merged

codeandsolder merged 6 commits into
mainfrom
fix/unified-auth-logout

Conversation

@codeandsolder

@codeandsolder codeandsolder commented Aug 28, 2026 •

Copy link
Copy Markdown
Owner

Login establishes both a Bearer/refresh-token identity and a server-side cookie session, but /auth/logout previously revoked only refresh-token state. That allowed /auth/logout to return success while the same client remained authenticated through /session/whoami.

This change makes /auth/logout the unified logout path:

  • keep refresh-family revocation in the existing auth handler
  • after a successful /auth/logout response, flush the current server-side session in authenticated-route middleware
  • report session-store flush failures as server errors instead of returning a false-success logout
  • add a real gateway integration flow proving login -> authenticated session -> /auth/logout -> old session cookie is invalid and old refresh token is rejected

/session/logout remains available as the session-only endpoint; /auth/logout is the endpoint that tears down the credentials established together by /auth/login.

CI validation is green, including native Clippy, the full browser/integration suite, the unified logout regression, existing SQLx OpenTelemetry parenting coverage, production builds, and all Docker images.

@codeandsolder
codeandsolder marked this pull request as ready for review August 28, 2026 19:49
@codeandsolder
codeandsolder merged commit ca80e8c into main Aug 28, 2026
12 checks passed
@codeandsolder-git-wrangler
codeandsolder-git-wrangler Bot deleted the fix/unified-auth-logout branch September 29, 2026 04:13
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