feat(auth): share provider sign-in flows across clients - #12965
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
589a8f5 to
54c3c97
Compare
- Closing an auth controller no longer closes sessions admitted through it, so editing one instance does not kill sessions of peers sharing its binding. - A failed or interrupted method refresh keeps the last discovered methods. - ProviderAuthState drops unknown method types, interactions and owners instead of rejecting the whole state on older clients. - Deep links to a hidden default slot select it instead of reporting it missing. - Consent-gated browser sign-in reserves its tab before awaiting consent so web browsers do not block it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
54c3c97 to
49acdf0
Compare
This comment has been minimized.
This comment has been minimized.
| @@ -755,11 +756,6 @@ export function ProviderInstanceCard({ | |||
| <span className="min-w-0 flex-1"> | |||
| <span className="flex min-w-0 items-center gap-2"> | |||
| <span className="truncate text-sm font-medium text-foreground">{displayName}</span> | |||
There was a problem hiding this comment.
🟡 Medium settings/ProviderInstanceCard.tsx:758
Multiple instances of the same driver now render with the same name and status, so the sidebar no longer identifies which account users will open or toggle. The removed instanceId badge distinguished IDs such as codex and codex_work; please restore it for instances whose ID differs from instance.driver.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/components/settings/ProviderInstanceCard.tsx around line 758:
Multiple instances of the same driver now render with the same name and status, so the sidebar no longer identifies which account users will open or toggle. The removed `instanceId` badge distinguished IDs such as `codex` and `codex_work`; please restore it for instances whose ID differs from `instance.driver`.
There was a problem hiding this comment.
Not changing. The badge was removed on purpose in 9862712 ("omit instance IDs from provider sidebar"): raw instance IDs were noise in the sidebar. Instances of the same driver are meant to be told apart by the display name the user gives them.
There was a problem hiding this comment.
I understand the intent, but the concern remains: display names are optional and fall back to the driver label, so same-driver instances without custom names are indistinguishable. The ID badge only appeared when it differed from the driver, providing that fallback.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces substantial cross-client provider authentication behavior, including shared credential storage, new RPCs, session lifecycle coordination, and new web/mobile flows. It also changes default provider presentation and leaves a concrete account-identification concern unresolved. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
…rvice imports Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Provider setup has separate account flows for each driver, which makes new authentication methods hard to support consistently across environments and clients.
Add shared authentication contracts and interactions, a provider credential store, and account controls for web, desktop, and mobile. Coordinate credential changes with provider session admission and cleanup. Provider adapters retain ownership of token exchange and native credential formats. Account actions reflect verified sign-in state, dedicated API keys live under Setup using the shared settings row, and empty Runtime sections are hidden. The provider sidebar keeps Codex and Claude visible and only shows other default providers after configuration; configured instances remain visible when disabled. Account emails use the existing masking control.
Validation: focused authentication, credential storage, session admission, RPC authorization, Antigravity, and settings tests passed. Scoped contracts, client runtime, server, web, and mobile typechecks passed. The integrated stack passed 231 focused tests.
Shared auth review fixes from #12983 are now included on V2: response callbacks run outside the flow lock and drain before cancellation, credential responses are bounded, admitted shared-account startup is interrupted during sign-out, and peer account replacements preserve unrelated sessions. The unavailable provider icons were removed to fix the unused-export CI failure.
Latest validation: 48 focused auth, credential, routing, and admission tests plus the bounded-credentials contract regression pass. Scoped server and web typechecks pass.
The unchanged V2 selection-restart regression is fixed separately by #13113. Before/after UI evidence and provider sign-in verification are pending; this PR remains a draft.
Implemented with GPT-6 in the Codex harness.