chore(e2e): capture access_token from /oauth2/token response, not just Bearer header #123
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-server!123
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/e2e-capture-spa-build-hash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
mokosh-apps PR #84 (
fix/auth-callback-persists-tokens-before-nav) fixes an SPA bug where AuthCallback's post-login navigation kicked off an infinite OIDC loop. Without it the SPA exchanges tokens at/oauth2/tokenbut never fires a Bearer-carrying API call, so this setup times out. The CI gate on E2E passing then blocks the very staging redeploy that would land the fix - circular.Reading the access_token straight out of the first successful
/oauth2/tokenresponse breaks the cycle. The token endpoint POST fires as part of OIDC itself, regardless of whether the SPA's downstream data fetches ever run, so token capture survives a fully-broken SPA. The bearer-header sniff stays as a backstop; whichever signal arrives first wins.Once PR #84 deploys, the bearer-header path is the source of truth again - any healthy SPA fires authed API calls within milliseconds of mounting the dashboard, and the response-body path becomes a no-op fallback for whatever the NEXT regression in this area looks like.
Diagnostic: the timeout error block now also lists every observed
/oauth2/tokenresponse with its HTTP status, so the next failure tells us whether OIDC even completed (zero entries = bunyip login never returned to mokosh) vs. completed but returned a bad token (entries with non-2xx status) vs. completed cleanly but the SPA never used the result.Updated the leading comment to match (the
/v1/auth/membershipsreasoning was load-bearing for the original implementation but mokosh-apps PR #79 removed that call, so the explanation rotted; replaced it with the two-path justification).Typecheck:
npx tsc --noEmitclean.