fix: set canonical User-Agent header format#542
Conversation
The User-Agent header is now always `workos-go/v{Version}`,
matching the canonical WorkOS Go SDK format used through the
6.x line.
The `WithAppInfo` option is still accepted for backwards
compatibility, but the value no longer affects the outgoing
`User-Agent` header. The 7.0.0 release inadvertently appended
appInfo to the User-Agent in a way that no longer conformed to
WorkOS' canonical SDK User-Agent format.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR fixes the Confidence Score: 4/5Safe to merge — the core fix is a single-line change with a matching test; only a stale doc comment remains. No logic errors; the only finding is a P2 stale comment on WithAppInfo. Score is 4 (P2s only). options.go — WithAppInfo doc comment and the appInfo struct/field are now dead/misleading. Important Files Changed
|
Summary
The outgoing
User-Agentheader is now alwaysworkos-go/v{Version}— the canonical WorkOS Go SDK format used through the 6.x line. The 7.0.0 release inadvertently appendedappInfoto the header in a way that no longer conformed.Behavior change
WithAppInfo()still parses for backwards compatibility, but the value no longer affects theUser-Agentheader. Callers relying on appInfo appearing inUser-Agentwill need to set a separate header via the request-options extra-headers mechanism.Test plan
go test ./...passesUser-Agent: workos-go/v{Version}on a real outgoing request🤖 Generated with Claude Code