Skip to content

[device-auth] Add device code auth as a standalone option when headless environment is detected.#9333

Merged
mzeng-openai merged 4 commits intomainfrom
dev/mzeng/device_code_headless_fix
Jan 16, 2026
Merged

[device-auth] Add device code auth as a standalone option when headless environment is detected.#9333
mzeng-openai merged 4 commits intomainfrom
dev/mzeng/device_code_headless_fix

Conversation

@mzeng-openai
Copy link
Contributor

Previously device code replaces the standard "Sign in with ChatGPT" option when headless environment is detected. This prevents certain users who's normal dev setup is remote devboxes. So we are move it to be an additional option alongside the standard browser flow instead of replacing it.

  • Add device code auth as a standalone option when headless environment is detected.

Copy link
Collaborator

@joshka-oai joshka-oai left a comment

Choose a reason for hiding this comment

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

Can this be tested simply? (e.g. Codex "add unit tests that use insta to check the output of these screens for the various combinations. Ideally these tests should be phrased as simple explanations of the behavior").

I suspect the animation may make this non-trivial, but there's a way to ignore parts of an output in insta (IIRC).

self.request_frame.schedule_frame();
}

fn handle_existing_chatgpt_login(&mut self) -> bool {
Copy link
Collaborator

@joshka-oai joshka-oai Jan 16, 2026

Choose a reason for hiding this comment

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

nit: A bool return value isn't really all that useful without documenting its meaning.

@mzeng-openai mzeng-openai marked this pull request as ready for review January 16, 2026 07:44
@mzeng-openai mzeng-openai merged commit 1315900 into main Jan 16, 2026
32 checks passed
@mzeng-openai mzeng-openai deleted the dev/mzeng/device_code_headless_fix branch January 16, 2026 16:35
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants