Skip to content

feat(auth): prepare uts browser sessions behind a flag - #13171

Open
iscekic wants to merge 4 commits into
mainfrom
igor/sts-p4-m351-bff
Open

iscekic wants to merge 4 commits into
mainfrom
igor/sts-p4-m351-bff

Conversation

@iscekic

@iscekic iscekic commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator

What changes

Add the Web browser session flow for the User Token Service (UTS) behind UTS_BROWSER_SESSIONS. Keep the flag off and keep the legacy sign-in and session behavior. Scope the new flow to the configured environment and its registered callback.

When enabled, the browser reads the Web session endpoint instead of using the NextAuth refresh path. An unavailable session check keeps the current identity and shows a retry. A status read does not finish a sign-out. Keep the session handle until the explicit end succeeds, so a retry can finish revocation publication.

This pull request does not enable the flag or change production settings. Revert the code to roll back this flag-off change. The separate session rollout plan governs recovery after activation.

Verification

  • Scoped VM checks: 11 suites on the flag-off candidate, followed by the footer and sign-in render suites on the test-only delta. All targeted tests passed. Scoped Web and Web Shared typechecks passed. The fixture used synthetic data and no provider calls.
  • The offline proof checks server failures, cookie handling and sign-out retry. It does not prove the hosted browser or Next.js framework error selection. The registered staging browser proof remains open. No staging or production switch is part of this pull request.
  • The footer test review found two fixture issues: global cleanup and preserving disabled state in the menu adapter. Both fixes are in progress; they do not change application code.
  • General (openai-codex/gpt-6.2-sol), security and performance (Claude Opus 5.5): final exact-head reviews in progress. CI starts with this pull request.

Request cost

With the flag off, the browser keeps the existing session endpoint and makes no new UTS session request. When enabled, the Web session check uses the existing focus and freshness policy. It does not add a polling interval. A failed sign-out retries only after the user requests it.

- Keep legacy browser sessions while the UTS switch is unset.
- Keep the browser session handle until sign-out completes.
- Record the exact non-authorizing legacy session claim in the staff inventory.
- Apply the pinned formatter to the two browser tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant