Skip to content

fix(codex-oauth): keep shared workspace members separate - #509

Merged
SaladDay merged 1 commit into
mainfrom
fix/493-codex-account-identity
Oct 12, 2026
Merged

SaladDay merged 1 commit into
mainfrom
fix/493-codex-account-identity

Conversation

@SaladDay

Copy link
Copy Markdown
Owner

Logging in a second member of the same ChatGPT workspace could overwrite the first member’s refresh token. Managed Codex OAuth accounts now have separate local IDs and workspace identities, using the account identity and login lifecycle implementation from cc-switch #6780 and its follow-up fixes.

Reauthenticate an existing account with cc-switch auth login --account-id <id> or Reauthenticate in the TUI account menu. Workspace and OIDC subject checks preserve provider bindings and reject a different user. Older account records are marked as requiring reauthentication and cannot silently supply credentials until confirmed.

Proxy requests, model discovery, quota inspection and quota reset resolve the workspace from the selected local account. The bound workspace overrides stale incoming headers. CLI managed OAuth remains a Claude proxy-provider feature; native Codex auth.json activation and ownership are outside this change. Source provenance and integration boundaries are documented in docs/maintenance/codex-oauth-identity-alignment.md.

Validation: 65 OAuth-related tests, 1851 TUI tests, 47 request-construction tests, 7 auth command parsing tests, and the auth service/command tests passed in isolated configuration directories (some filters overlap). Coverage includes shared-workspace members, targeted reauthentication, legacy quarantine, duplicate and concurrent logins, cancellation/expiry, and bound-member request headers. Formatting and whitespace checks passed. No real OAuth credentials or production configuration were used.

Closes #493.

@SaladDay
SaladDay marked this pull request as ready for review October 12, 2026 05:17
@SaladDay
SaladDay merged commit addeb1b into main Oct 12, 2026
6 checks passed
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.

Codex:同一个 ChatGPT Team 里的两个账号会互相覆盖

1 participant