Skip to content

feat: send CLI User-Agent on the OAuth token exchange#174

Merged
aprimakina merged 1 commit into
mainfrom
feat/login-user-agent
Jul 8, 2026
Merged

feat: send CLI User-Agent on the OAuth token exchange#174
aprimakina merged 1 commit into
mainfrom
feat/login-user-agent

Conversation

@aprimakina

@aprimakina aprimakina commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

The login token exchange used oauth2's default HTTP client, so it sent no tiger-cli User-Agent — the gateway recorded the CLI session's device_name as 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 shared config.UserAgent() helper reused by the API client.

Completes the CLI side of session device-info recording:

  • tiger-cli (this PR) — sends the User-Agent on the token exchange.
  • timescale/savannah-gateway#1837 — forwards x-forwarded-user-agent / x-forwarded-for to the User service.
  • timescale/savannah-users#560 — records device_name / device_ip on the session.

@aprimakina aprimakina self-assigned this Jul 2, 2026
@aprimakina aprimakina marked this pull request as draft July 2, 2026 13:20
@aprimakina aprimakina force-pushed the feat/login-user-agent branch 2 times, most recently from 04c5a82 to e2f533f Compare July 7, 2026 17:15
@aprimakina aprimakina marked this pull request as ready for review July 7, 2026 17:17
@aprimakina aprimakina requested a review from Askir July 7, 2026 17:17
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>
@aprimakina aprimakina force-pushed the feat/login-user-agent branch from e2f533f to 9259add Compare July 7, 2026 19:47

@Askir Askir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks simple enough 👍

@aprimakina aprimakina merged commit 5a449b9 into main Jul 8, 2026
2 checks passed
@aprimakina aprimakina deleted the feat/login-user-agent branch July 8, 2026 12:37
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