Skip to content

fix(auth): signing out of Explorer signs out of every Elcano app - #24

Merged
jzhao234 merged 2 commits into
mainfrom
feat/logout-everywhere
Sep 16, 2026
Merged

jzhao234 merged 2 commits into
mainfrom
feat/logout-everywhere

Conversation

@jzhao234

Copy link
Copy Markdown
Contributor

TLDR

Explorer's logout used to end only the Explorer session and show its own signed-out page; the central Auth session stayed alive, so the next click on any app signed the user straight back in. Logout now hands the browser to Auth's sign-out endpoint, which ends the central session, tells every registered application to drop its sessions, and lands on Auth's login page.

Problem

POST /logout revoked the local session and redirected to /signed-out. With Fleet's silent SSO start (FLEET_OIDC_AUTO_START) a user who logged out of Explorer and opened Fleet was signed in again without a prompt, and Explorer itself re-signed them in on the next visit. "Log out" therefore appeared to do nothing.

Fix

  • After revoking the local session and clearing the cookie, redirect to <AUTH_ISSUER_URL>/logout?client_id=<AUTH_CLIENT_ID> (Auth's RP-initiated logout, ElcanoTek/auth#36). Auth revokes every central session of the account, fans a signed back-channel logout out to every application (Explorer included; idempotent), and shows its login page with a notice.
  • /signed-out stays as a plain page for direct visits.
  • Deploy Auth first: against an older Auth the GET is a 405.

Tests

  • test_logout_requires_csrf_and_revokes_only_explorer_session now asserts the 303 targets https://auth.example.com/logout?client_id=explorer.
  • ruff check, ruff format --check, full suite 113 passed.

TLDR

Explorer's logout used to end only the Explorer session and show its own
signed-out page; the central Auth session stayed alive, so the next click on
any app signed the user straight back in. Logout now hands the browser to
Auth's sign-out endpoint, which ends the central session, tells every
registered application to drop its sessions, and lands on Auth's login page.

Problem

POST /logout revoked the local session and redirected to /signed-out. With
Fleet's silent SSO start (FLEET_OIDC_AUTO_START) a user who logged out of
Explorer and opened Fleet was signed in again without a prompt, and Explorer
itself re-signed them in on the next visit. "Log out" therefore appeared to do
nothing, which is the owner's report.

Fix

- After revoking the local session and clearing the cookie, redirect to
  `<AUTH_ISSUER_URL>/logout?client_id=<AUTH_CLIENT_ID>` (Auth's RP-initiated
  logout, ElcanoTek/auth#36). Auth revokes every central session of the
  account, fans a signed back-channel logout out to every application
  (Explorer included; idempotent), and shows its login page with a notice.
- /signed-out stays as a plain page for direct visits.
- Requires Auth main 9f36ed8+ with #36; against an older Auth the GET is a
  405, so deploy Auth first.

Tests

- test_logout_requires_csrf_and_revokes_only_explorer_session now asserts the
  303 targets https://auth.example.com/logout?client_id=explorer.
- ruff check, ruff format --check, full suite 113 passed.
…kie deletion

DEPLOYMENT.md said normal logout stayed scoped to the Explorer session; the
test was named for the old contract. Both now match the redirect to Auth's
RP-initiated logout, and the test asserts the app cookie is deleted.
@jzhao234
jzhao234 merged commit 8ad86c5 into main Sep 16, 2026
4 checks passed
@jzhao234
jzhao234 deleted the feat/logout-everywhere branch September 16, 2026 02:59
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