fix(webapp): signing out is a POST; GET /auth/logout ends nothing (#1163) #1165

Merged
claude-bot merged 2 commits from fix/1163-logout-is-a-post into main 2026-10-13 03:42:34 +00:00
Collaborator

Part of #1163 (the logout piece; the other GET routes that write stay open there).

GET /auth/logout ended the session, so following any link to it logged the reader out.

  • POST /auth/logout ends the session and clears the cookie, answering 200 {"redirect": "<APP_URL>/login"}; the frontend navigates. There was no OIDC end-session redirect to preserve.
  • GET /auth/logout now only redirects to /. It touches no session.
  • Cross-site protection is the session cookie's SameSite=Lax, the same as every other cookie-authenticated write; the backend has no CSRF token or Origin check, and none is added here.
  • A failed sign-out no longer looks like a successful one: the user stays in the signed-in frame with "You are still signed in. Try again." The one exception is after account deletion, where the session is already dead.
  • The PWA needs no change (/auth/ is network-only and Workbox routes match GET).

No bot API change, no migration.

Verified

On docker-test: test_auth_logout.py (new), test_auth_routes.py, test_auth_callback.py (28 passed); ruff; changelog and version checks; frontend lint; vitest for auth.test.js, AppFrame.test.jsx, Profile.test.jsx, AccountMenu (168 passed).

Not run: the journeys (their signOut fixture now POSTs) and the full backend suite; left to CI.

🤖 Generated with Claude Code

Part of #1163 (the logout piece; the other GET routes that write stay open there). `GET /auth/logout` ended the session, so following any link to it logged the reader out. - `POST /auth/logout` ends the session and clears the cookie, answering 200 `{"redirect": "<APP_URL>/login"}`; the frontend navigates. There was no OIDC end-session redirect to preserve. - `GET /auth/logout` now only redirects to `/`. It touches no session. - Cross-site protection is the session cookie's `SameSite=Lax`, the same as every other cookie-authenticated write; the backend has no CSRF token or Origin check, and none is added here. - A failed sign-out no longer looks like a successful one: the user stays in the signed-in frame with "You are still signed in. Try again." The one exception is after account deletion, where the session is already dead. - The PWA needs no change (`/auth/` is network-only and Workbox routes match GET). No bot API change, no migration. ## Verified On `docker-test`: `test_auth_logout.py` (new), `test_auth_routes.py`, `test_auth_callback.py` (28 passed); ruff; changelog and version checks; frontend lint; vitest for `auth.test.js`, `AppFrame.test.jsx`, `Profile.test.jsx`, `AccountMenu` (168 passed). Not run: the journeys (their `signOut` fixture now POSTs) and the full backend suite; left to CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(webapp): a failed sign-out keeps you signed in and says so (#1163)
All checks were successful
CI / Bot/backend version sync (pull_request) Successful in 40s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m10s
CI / Backend lint (ruff) (pull_request) Successful in 48s
CI / Feedback site tests (pull_request) Successful in 1m2s
CI / Does this change touch the recording path? (pull_request) Successful in 30s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot tests and audit (pull_request) Successful in 2m20s
CI / Docker image build (pull_request) Successful in 3m8s
CI / Frontend (shard 2/2) (pull_request) Successful in 9m41s
CI / Frontend (shard 1/2) (pull_request) Successful in 12m6s
CI / End-to-end journeys (phone) (pull_request) Successful in 15m4s
CI / End-to-end journeys (keyboard) (pull_request) Successful in 19m24s
CI / End-to-end journeys (desktop) (pull_request) Successful in 19m40s
CI / Backend migration, tests, and audit (pull_request) Successful in 33m5s
af34d22fd9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-bot deleted branch fix/1163-logout-is-a-post 2026-10-13 03:42:35 +00:00
Sign in to join this conversation.
No description provided.