fix(auth): portal sign-out shows the keycloak confirm page despite id_token_hint #398
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-web#398
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Portal sign-out shows Keycloak's "Do you want to log out?" confirm page, although the request carries
id_token_hint.Repro
Staging, 2026-10-17, signed in on
www.stg.bitborg.se. "Logga ut" posts/auth/logout(302) toid.stg.bitborg.se/realms/bitborg/protocol/openid-connect/logout?client_id=bitborg-web&id_token_hint=…&post_logout_redirect_uri=https://www.stg.bitborg.se/. Keycloak answers200with the confirm page instead of logging out and redirecting.Likely cause
Keycloak's
LogoutEndpointforces the confirm page when theid_token_hintsession (sid) does not match the browser's current Keycloak session. The portal may keep an id_token from an earlier session, for example after the Keycloak session was ended elsewhere and a new one started.To confirm
Decode the
sidclaim of the id_token the portal sends and compare it with the session in theKEYCLOAK_SESSIONcookie onid.stg.bitborg.se.Done when