fix(auth): return to the portal origin after logout #329

Sammanfogat
supernaut sammanfogade 1 incheckning från fix/logout-redirect-origin in i main 2026-10-09 19:23:26 +00:00
Ägare

Refs #311.

Why

Logout on staging ended on Keycloak's "invalid redirect" page. post_logout_redirect_uri came from PUBLIC_SITE_URL, which Vite inlines at build time. The CI image is built without it, so staging sent https://www.bitborg.se/, which the staging client does not allow.

What

buildLogoutUrl uses the origin of OIDC_REDIRECT_URI, which is read at runtime and already set per environment. Version 1.27.1.

Tests

The logout test asserts the exact return URL. Unit tests, check and lint pass.

Prod is pinned, so this merge only reaches staging.

Refs #311. ## Why Logout on staging ended on Keycloak's "invalid redirect" page. `post_logout_redirect_uri` came from `PUBLIC_SITE_URL`, which Vite inlines at build time. The CI image is built without it, so staging sent `https://www.bitborg.se/`, which the staging client does not allow. ## What `buildLogoutUrl` uses the origin of `OIDC_REDIRECT_URI`, which is read at runtime and already set per environment. Version 1.27.1. ## Tests The logout test asserts the exact return URL. Unit tests, check and lint pass. Prod is pinned, so this merge only reaches staging.
supernaut lade till 1 incheckning 2026-10-09 19:20:58 +00:00
fix(auth): return to the portal origin after logout
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m53s
ccfe2e385a
The post-logout target came from PUBLIC_SITE_URL, which Vite inlines at build time, so staging sent users to the prod site and Keycloak refused the redirect. Use the origin of the runtime OIDC_REDIRECT_URI instead. Refs #311
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-09 19:22:37 +00:00
supernaut sammanfogade incheckning 1be1d5acb9 till main 2026-10-09 19:23:26 +00:00
supernaut tog bort grenen fix/logout-redirect-origin 2026-10-09 19:23:26 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-09 19:23:28 +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!329
Ingen beskrivning angiven.