fix(auth): link back to the portal after enrolment #330

Sammanfogat
supernaut sammanfogade 1 incheckning från fix/action-email-return in i main 2026-10-09 20:04:15 +00:00
Ägare

Refs #311.

Why

After completing the enrolment link, Keycloak showed "Ditt konto har uppdaterats" with no way back. The action email was sent without client_id and redirect_uri.

What

sendActionEmail (sign-up and resend) sends client_id and redirect_uri=<origin of OIDC_REDIRECT_URI>/account. Keycloak's done page then links back to the portal account page. The origin comes from the runtime redirect URI, not the build-time SITE_URL. Version 1.27.2.

Depends on

The realm must allow <portal>/account as a redirect for bitborg-web (bitborg/bitborg-infra branch fix/web-client-account-redirect), or Keycloak answers 400. Applied on staging. Prod gets it with the prod realm at cutover; prod web is pinned until then.

Verified

On staging: execute-actions-email with these params returns 204; a foreign redirect_uri returns 400. Unit tests assert both params.

Refs #311. ## Why After completing the enrolment link, Keycloak showed "Ditt konto har uppdaterats" with no way back. The action email was sent without `client_id` and `redirect_uri`. ## What `sendActionEmail` (sign-up and resend) sends `client_id` and `redirect_uri=<origin of OIDC_REDIRECT_URI>/account`. Keycloak's done page then links back to the portal account page. The origin comes from the runtime redirect URI, not the build-time `SITE_URL`. Version 1.27.2. ## Depends on The realm must allow `<portal>/account` as a redirect for `bitborg-web` (bitborg/bitborg-infra branch `fix/web-client-account-redirect`), or Keycloak answers 400. Applied on staging. Prod gets it with the prod realm at cutover; prod web is pinned until then. ## Verified On staging: `execute-actions-email` with these params returns 204; a foreign `redirect_uri` returns 400. Unit tests assert both params.
supernaut lade till 1 incheckning 2026-10-09 20:01:44 +00:00
fix(auth): return to the portal after the action email
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m57s
cff554e48e
execute-actions-email now sends client_id and redirect_uri, so Keycloak
offers a way back after the user completes the enrolment link.

Refs #311
supernaut sammanfogade incheckning 11da614dad till main 2026-10-09 20:04:15 +00:00
supernaut tog bort grenen fix/action-email-return 2026-10-09 20:04:15 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-09 20:04:16 +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!330
Ingen beskrivning angiven.