Skip to content

fix(oauth): send CLI User-Agent on OAuth requests - #1019

Merged
m-abdelwahab merged 1 commit into
masterfrom
oauth-user-agent
Jul 20, 2026
Merged

fix(oauth): send CLI User-Agent on OAuth requests#1019
m-abdelwahab merged 1 commit into
masterfrom
oauth-user-agent

Conversation

@m-abdelwahab

@m-abdelwahab m-abdelwahab commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

What

Sets User-Agent: CLI <version> on the reqwest client used for all OAuth requests (device flow + token refresh), via the same consts::get_user_agent() the GraphQL client already uses. Previously build_http_client() set no User-Agent, and reqwest sends none by default. Needed for debugging purposes

Testing

  • cargo check passes, cargo fmt --check clean.

🤖 Generated with Claude Code

The OAuth HTTP client was built without a User-Agent, so token
refresh (and device-flow) requests reach backboard anonymous —
unlike GraphQL requests, which already send "CLI <version>".
This makes OAuth failures (e.g. invalid_grant on refresh)
unattributable to a CLI version in server logs.

Use the same consts::get_user_agent() the GraphQL client uses.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@m-abdelwahab m-abdelwahab added the release/patch Author patch release label Jul 20, 2026
@m-abdelwahab
m-abdelwahab merged commit da0a3e6 into master Jul 20, 2026
6 of 7 checks passed
@m-abdelwahab
m-abdelwahab deleted the oauth-user-agent branch July 20, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/patch Author patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant