Skip to content

Add OAuth 2.0 support and token caching for Garmin#85

Open
this-Aditya wants to merge 6 commits intodevfrom
garmin-oauth-migration
Open

Add OAuth 2.0 support and token caching for Garmin#85
this-Aditya wants to merge 6 commits intodevfrom
garmin-oauth-migration

Conversation

@this-Aditya
Copy link
Member

This PR introduces the following updates:

  • Updated GarminAuthValidator to verify OAuth 2.0 tokens.
  • Migrated Garmin backfill requests from OAuth 1.0 signed requests to OAuth 2.0 bearer token authentication.
  • Added a TokenCache to cache OAuth 2.0 access tokens.
    • OAuth 1.0 access tokens for Garmin do not expire and could be reused indefinitely once fetched.
    • OAuth 2.0 access tokens expire, so a this cache mechanism is added.
    • Tokens are cached only if their remaining lifetime is greater than 30 minutes to avoid expiration-related issues.

NOTE: This PR doesn't remove the support for oauth1, any version can be used by updating the configurations, once we fully migrate to oauth2 the oauth1 flow will be removed

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 10, 2026
@dosubot
Copy link

dosubot bot commented Feb 10, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant