fix(auth): log out without the keycloak confirm page #333

Sammanfogat
supernaut sammanfogade 3 incheckningar från fix/logout-id-token-hint in i main 2026-10-09 21:30:05 +00:00
Ägare

Refs #311.

Why

Logout stopped on Keycloak's "Do you want to log out?" page. Without id_token_hint Keycloak asks for confirmation, and if the user leaves that page the SSO session stays alive, so the next sign-in is silent.

What

  • The callback stores the verified ID token in its own HttpOnly, SameSite=Lax, Secure-on-https cookie gb_id_token, with the session's lifetime.
  • Logout reads it before clearing the session and sends it as id_token_hint. clearSession removes both cookies.
  • No hint (an older session) falls back to the confirm page, as before.
  • Version 1.28.2. Main is merged in.
  • Also carries the welcome page button label left out of #332: "Gå till din kontosida" / "Go to your account page".

Tests

548 pass, new: the hint is sent when present. Lint, check, build and e2e pass.

Refs #311. ## Why Logout stopped on Keycloak's "Do you want to log out?" page. Without `id_token_hint` Keycloak asks for confirmation, and if the user leaves that page the SSO session stays alive, so the next sign-in is silent. ## What - The callback stores the verified ID token in its own HttpOnly, SameSite=Lax, Secure-on-https cookie `gb_id_token`, with the session's lifetime. - Logout reads it before clearing the session and sends it as `id_token_hint`. `clearSession` removes both cookies. - No hint (an older session) falls back to the confirm page, as before. - Version 1.28.2. Main is merged in. - Also carries the welcome page button label left out of #332: "Gå till din kontosida" / "Go to your account page". ## Tests 548 pass, new: the hint is sent when present. Lint, check, build and e2e pass.
supernaut lade till 1 incheckning 2026-10-09 21:07:55 +00:00
fix(auth): log out without the keycloak confirm page
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m49s
9bbab40ff2
Keep the verified ID token in its own HttpOnly cookie and send it as id_token_hint at logout. Without the hint, Keycloak stops on a confirm page and the SSO session stays alive if the user leaves it. Refs #311
supernaut lade till 2 incheckningar 2026-10-09 21:18:59 +00:00
# Conflicts:
#	package.json
fix(signup): name the account page in the welcome button
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m0s
3f9b61c348
The second button led to the portal account page, but the label read as signing in somewhere unnamed. Refs #311
supernaut sammanfogade incheckning 4e0ce3016b till main 2026-10-09 21:30:05 +00:00
supernaut tog bort grenen fix/logout-id-token-hint 2026-10-09 21:30:05 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-09 21:30:05 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-web!333
Ingen beskrivning angiven.