Skip to content

Conversation

@abrar71
Copy link

@abrar71 abrar71 commented Dec 11, 2025

What

Update the device-code login flow to build the browser URL and redirect URI from the configured OAuth issuer instead of hard-coding https://auth.openai.com.

Why

When using a custom or experimental issuer (for example via --experimental_issuer), the CLI still shows the default auth.openai.com device URL, which is confusing and can send user to the wrong login page.

How

  • Thread issuer_base_url through run_device_code_login into print_device_code_prompt.
  • Replace the hard-coded device auth URL with {issuer_base_url}/codex/device in the prompt.
  • Use issuer_base_url consistently for api_base_url and the redirect URI ({issuer_base_url}/deviceauth/callback).

Tests

  • just fmt
  • cargo test -p codex-login

@abrar71
Copy link
Author

abrar71 commented Dec 11, 2025

I have read the CLA Document and I hereby sign the CLA

@github-actions
Copy link

github-actions bot commented Dec 11, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

github-actions bot added a commit that referenced this pull request Dec 11, 2025
@etraut-openai
Copy link
Collaborator

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

2 participants