Skip to content

fix(auth): preserve Keycloak logout hint and clear legacy session tokens - #310

Open
jdotc1 wants to merge 3 commits into
TripSit:uatfrom
jdotc1:fix/web-005-logout-preserve-id-token
Open

jdotc1 wants to merge 3 commits into
TripSit:uatfrom
jdotc1:fix/web-005-logout-preserve-id-token

Conversation

@jdotc1

@jdotc1 jdotc1 commented Nov 9, 2026

Copy link
Copy Markdown

Closes #267 (WEB-005).

Security / session correctness

The existing handler deleted kc_id_token before constructing the Keycloak end-session URL, so id_token_hint was always blank. Login status also recognized legacy localStorage tokens, but logout never cleared them.

Changes

  • Build the logout URL before clearing credentials.
  • Remove access, refresh, and ID tokens from both session and legacy local storage.
  • Use a legacy local-storage ID token as fallback when needed.
  • Add Jest regression tests checking hint preservation, cleanup, and legacy fallback.

Verification

The baseline checks fail without this fix and pass against the updated code. Focused test source and patched files were verified on the isolated fork branch; upstream Jest/CI execution is pending.

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.

Logout deletes the ID token before building the Keycloak logout URL (WEB-005)

1 participant