Repository navigation
web/flows: check if localStorage is available for continuous login - #26267
Conversation
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26267 +/- ##
==========================================
- Coverage 92.00% 91.97% -0.04%
==========================================
Files 1175 1175
Lines 76288 76288
Branches 4056 4056
==========================================
- Hits 70192 70166 -26
- Misses 6054 6080 +26
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Playwright e2eDownload this run's HTML report, traces and server logs, then open the report: gh run download 35351301629 -D playwright-artifacts
npx playwright show-report playwright-artifacts/playwright-reportInstallation instructionsInstructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-d6ae99e77169c0115e5e7c427529a3ee49d76b12
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-d6ae99e77169c0115e5e7c427529a3ee49d76b12Afterwards, run the upgrade commands from the latest release notes. |
|
🍒 Cherry-pick to |
|
🍒 Cherry-pick to |
…herry-pick #26267 to version-2026.8) (#26638) web/flows: check if localStorage is available for continuous login (#26267) Co-authored-by: Jens L. <[email protected]>
…herry-pick #26267 to version-2026.5) (#26639) web/flows: check if localStorage is available for continuous login (#26267) Co-authored-by: Jens L. <[email protected]>
The final redirect awaits continuous-login orchestration and the exit bookkeeping before navigating, so any error or hang there leaves the page on the spinner after the server has already finished the flow. In Google's Android account setup WebView, localStorage is null and the orchestrator throws (goauthentik#23660, goauthentik#26267). - Catch and log orchestration errors in RedirectStage, then always navigate. - Return a copy from discoverTabs(). waitForTabExit() rediscovers while the leader iterates the live Set, and entries re-added during for...of are visited again, so a follower that never exits was resumed forever. - Resolve the wait when rediscovery rejects in the timer callback, and release the tab lock in a finally block.
The final redirect awaits continuous-login orchestration and the exit bookkeeping before navigating, so any error or hang there leaves the page on the spinner after the server has already finished the flow. In Google's Android account setup WebView, localStorage is null and the orchestrator throws (goauthentik#23660, goauthentik#26267). - Catch and log orchestration errors in RedirectStage, then always navigate. - Return a copy from discoverTabs(). waitForTabExit() rediscovers while the leader iterates the live Set, and entries re-added during for...of are visited again, so a follower that never exits was resumed forever. - Resolve the wait when rediscovery rejects in the timer callback, and release the tab lock in a finally block.
The final redirect awaits continuous-login orchestration and the exit bookkeeping before navigating, so any error or hang there leaves the page on the spinner after the server has already finished the flow. In Google's Android account setup WebView, localStorage is null and the orchestrator throws (goauthentik#23660, goauthentik#26267). - Catch and log orchestration errors in RedirectStage, then always navigate. - Return a copy from discoverTabs(). waitForTabExit() rediscovers while the leader iterates the live Set, and entries re-added during for...of are visited again, so a follower that never exits was resumed forever. - Resolve the wait when rediscovery rejects in the timer callback, and release the tab lock in a finally block.
* never let continuous login block the final redirect The final redirect awaits continuous-login orchestration and the exit bookkeeping before navigating, so any error or hang there leaves the page on the spinner after the server has already finished the flow. In Google's Android account setup WebView, localStorage is null and the orchestrator throws (#23660, #26267). - Catch and log orchestration errors in RedirectStage, then always navigate. - Return a copy from discoverTabs(). waitForTabExit() rediscovers while the leader iterates the live Set, and entries re-added during for...of are visited again, so a follower that never exits was resumed forever. - Resolve the wait when rediscovery rejects in the timer callback, and release the tab lock in a finally block. * web/flow: elect continuous-login resume leader with a Web Lock Replace the hand-rolled localStorage lock — a non-atomic check-then-set guarded by a tab-liveness heuristic — with navigator.locks. `ifAvailable` gives immediate leader election with no double-leader race, and the browser releases the lock on navigation or close, so there is no stale lock to reap and no manual cleanup. * web/test: cover continuous-login multi-tab resume Drive two real tabs in one browser context: authenticate in the leader and assert the follower leaves the identification stage on its own. The global flag is enabled in beforeAll and restored in afterAll; the file carries the highest numeric prefix and runs serially so it does not race the parallel login suite. * Refine comments. * web/test: align continuous-login e2e with suite conventions Move the global-flag toggle into an e2e/ helper (setInstanceFlag) so the test stops hand-constructing fixtures inline, and confirm the settings save through its success toast instead of matching the settings network response — keeping the flow on the UI like the rest of the suite. * web/test: pad the continuous-login visibility assertions * web/flow: rework continuous-login unit tests around the Web Lock * web/test: wait for each tab to see the continuous-login flag * web: share server-context document readers via @goauthentik/core/document * web/flow: share a brand injection helper across continuous-login tests * Clean up comment. --------- Co-authored-by: Teffen Ellis <[email protected]> Co-authored-by: Teffen Ellis <[email protected]>
localStorage is not available in MinuteMaid (Android google account setup)