fix(auth): logout lands on this SPA's origin home, not Bunyip's login #81

Merged
YousifShkara merged 1 commit from fix/logout-lands-on-mokosh-home into main 2026-06-06 03:18:25 +02:00
Owner

PR #82 wired the UserMenu's Logout to bunyip-api GET /v1/auth/logout?url=<x> with the hub login as the url target, so users were redirected to bunyip-web /login after signing out. The companion bunyip change (fix/logout-honors-final-url, PR pending) replaces the old "bounce through /login" semantics with a direct 302 to url. With that landed, the same logout button now needs to point url at the SPA's own origin root so the user ends up on the mokosh public landing page, signed out, instead of on the Bunyip login form.

Resolves the url at click time from window.location.origin so the same build works against any deployment hostname (msp.a8n.systems, msp.psa.systems, self-hosted): no hardcoded host, no env coupling. Falls back to cfg.hub_url("/") when the browser origin is somehow unavailable (server-side render path, mostly unreachable in web builds).

Depends on the bunyip change shipping first; with the old bunyip behaviour the SPA would now redirect to /login?redirect=https://msp.<tld>/, which is a worse failure mode than the previous "lands on bunyip /login" outcome. Merge order: bunyip first, then this.

PR #82 wired the UserMenu's Logout to bunyip-api `GET /v1/auth/logout?url=<x>` with the hub login as the `url` target, so users were redirected to bunyip-web `/login` after signing out. The companion bunyip change (fix/logout-honors-final-url, PR pending) replaces the old "bounce through /login" semantics with a direct 302 to `url`. With that landed, the same logout button now needs to point `url` at the SPA's own origin root so the user ends up on the mokosh public landing page, signed out, instead of on the Bunyip login form. Resolves the `url` at click time from `window.location.origin` so the same build works against any deployment hostname (msp.a8n.systems, msp.psa.systems, self-hosted): no hardcoded host, no env coupling. Falls back to `cfg.hub_url("/")` when the browser origin is somehow unavailable (server-side render path, mostly unreachable in `web` builds). Depends on the bunyip change shipping first; with the old bunyip behaviour the SPA would now redirect to `/login?redirect=https://msp.<tld>/`, which is a worse failure mode than the previous "lands on bunyip /login" outcome. Merge order: bunyip first, then this.
fix(auth): logout lands on this SPA's origin home, not Bunyip's login
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 1m2s
04943c8d9a
PR #82 wired the UserMenu's Logout to bunyip-api `GET /v1/auth/logout?url=<x>` with the hub login as the `url` target, so users were redirected to bunyip-web `/login` after signing out. The companion bunyip change (fix/logout-honors-final-url, PR pending) replaces the old "bounce through /login" semantics with a direct 302 to `url`. With that landed, the same logout button now needs to point `url` at the SPA's own origin root so the user ends up on the mokosh public landing page, signed out, instead of on the Bunyip login form.

Resolves the `url` at click time from `window.location.origin` so the same build works against any deployment hostname (msp.a8n.systems, msp.psa.systems, self-hosted): no hardcoded host, no env coupling. Falls back to `cfg.hub_url("/")` when the browser origin is somehow unavailable (server-side render path, mostly unreachable in `web` builds).

Depends on the bunyip change shipping first; with the old bunyip behaviour the SPA would now redirect to `/login?redirect=https://msp.<tld>/`, which is a worse failure mode than the previous "lands on bunyip /login" outcome. Merge order: bunyip first, then this.
YousifShkara deleted branch fix/logout-lands-on-mokosh-home 2026-06-06 03:18:25 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/mokosh-apps!81
No description provided.