Skip to content

Fix: make token_type optional in OAuth responses#12

Merged
tirthpatell merged 1 commit intomainfrom
fix/optional-token-type
Mar 21, 2026
Merged

Fix: make token_type optional in OAuth responses#12
tirthpatell merged 1 commit intomainfrom
fix/optional-token-type

Conversation

@tirthpatell
Copy link
Copy Markdown
Owner

Summary

  • Short-lived token exchange endpoint does not return token_type (confirmed by API docs sample response)
  • Deserialization fails with missing field 'token_type'
  • Make token_type optional with #[serde(default)], default to "bearer"
  • Bump to v0.1.1

Test plan

  • cargo fmt (clean)
  • cargo clippy (clean)
  • cargo test (170 pass)
  • Tested with real OAuth flow — confirmed the error

The short-lived token exchange endpoint does not return token_type
in the response (confirmed by API docs), causing deserialization to
fail. Make token_type Optional with a default of "bearer" for both
TokenResponse and LongLivedTokenResponse.

Bump version to 0.1.1.
@tirthpatell tirthpatell self-assigned this Mar 21, 2026
@tirthpatell tirthpatell merged commit f72386e into main Mar 21, 2026
7 checks passed
@tirthpatell tirthpatell deleted the fix/optional-token-type branch March 21, 2026 18:39
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.

1 participant