Device code auth support#281
Open
anvilpete wants to merge 1 commit into
Open
Conversation
anvilpete
commented
May 12, 2026
| cx.spawn(async move { | ||
| responder.respond_with_result(agent.authenticate(request).await) | ||
| responder | ||
| .respond_with_result(agent.authenticate(request, auth_cx).await) |
Contributor
Author
There was a problem hiding this comment.
cx is passed in here to allow the handler to spawn a complete_device_code_login() task. We could perhaps pass a narrower spawner trait instead, or maybe even return a Future from the handler.
anvilpete
commented
May 12, 2026
| - Custom Prompts | ||
| - Client MCP servers | ||
| - Auth Methods: | ||
| - ChatGPT subscription (requires paid subscription and doesn't work in remote projects) |
Contributor
Author
There was a problem hiding this comment.
Paid subscriptions aren't required.. maybe they were at some point in the past?
f51e253 to
f37c084
Compare
Contributor
Author
|
Support for #149 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds device code auth support for ChatGPT login when no browser is available.
Ideally this should use a URL Elicitation Required Error once the Elicitations RFD is approved. Instead it responds with
Error::auth_required()withdata: { message, url, user_code }. Happy to change this to aURLElicitationRequiredErrorif you prefer that.I didn't add an equivalent of the optional
elicitation/completenotification, as our client doesn't require this. But I can do if you like.It requires the client to advertise
"clientCapabilities": {"_meta": {"codex-acp": {"deviceCodeAuth": true } } }, to avoid breaking any assumptions in existing client implementations.