Skip to content

fix(auth): preserve Codex id_token during OAuth exchange#2946

Open
Edition-X wants to merge 4 commits intotailcallhq:mainfrom
Edition-X:fix/codex-preserve-id-token
Open

fix(auth): preserve Codex id_token during OAuth exchange#2946
Edition-X wants to merge 4 commits intotailcallhq:mainfrom
Edition-X:fix/codex-preserve-id-token

Conversation

@Edition-X
Copy link
Copy Markdown

@Edition-X Edition-X commented Apr 10, 2026

Closes #2947

Summary

  • preserve full OAuth token responses instead of dropping provider-specific fields
  • keep Codex account-id enrichment working when the claim exists only in id_token
  • remove now-unused token helper and add regression coverage

Why

Codex credential enrichment prefers id_token claims to derive chatgpt_account_id, but the previous code dropped id_token during token exchange. That made login behavior depend on whether the access token happened to contain the same claim.

Verification

  • cargo fmt --all
  • cargo test -p forge_infra --lib
  • cargo check -p forge_infra

Edition-X and others added 2 commits April 10, 2026 22:45
Co-Authored-By: ForgeCode <noreply@forgecode.dev>
Co-Authored-By: ForgeCode <noreply@forgecode.dev>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 10, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the type: fix Iterations on existing features or infrastructure. label Apr 10, 2026
.set_auth_uri(AuthUrl::new(config.auth_url.to_string())?)
.set_token_uri(TokenUrl::new(config.token_url.to_string())?);
let http_client = self.build_http_client(config)?;
let mut params = vec![
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a concreate rust type

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed a fix

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

Labels

type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Codex OAuth drops id_token during login

3 participants