feat: send CLI User-Agent on the OAuth token exchange#174
Merged
Conversation
04c5a82 to
e2f533f
Compare
The login token exchange used oauth2's default HTTP client, so it sent no tiger-cli User-Agent — leaving the gateway to record the session's device_name as the Go default. Route the exchange through a client that sets the CLI User-Agent, and enrich it with OS/arch (tiger-cli/<version> (os/arch)) via a shared config.UserAgent() helper reused by the API client. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
e2f533f to
9259add
Compare
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.
The login token exchange used oauth2's default HTTP client, so it sent no
tiger-cliUser-Agent — the gateway recorded the CLI session'sdevice_nameas the Go default. This routes the exchange through a client that sets the CLI User-Agent (enriched with OS/arch,tiger-cli/<version> (os/arch)) via a sharedconfig.UserAgent()helper reused by the API client.Completes the CLI side of session device-info recording:
x-forwarded-user-agent/x-forwarded-forto the User service.device_name/device_ipon the session.