Skip to content

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Aug 27, 2025

Google doesn't follow the usual RFC 7662 format but instead uses their
own. This PR adds support for parsgin their format if using a well-known
Google endpoint.

To test:

  • Go to Google OAuth 2.0 Playground
  • Select the scopes you want (e.g. https://www.googleapis.com/auth/userinfo.email)
  • Click "Authorize APIs" and complete the OAuth flow

You'll get an access token that you can copy and use in the inspector.

Fixes: #1411

Copy link
Contributor

@yrobla yrobla left a comment

Choose a reason for hiding this comment

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

i'd like to decouple the google logic a bit more

@coveralls
Copy link
Collaborator

coveralls commented Sep 3, 2025

Coverage Status

coverage: 36.301% (+0.4%) from 35.876%
when pulling 742de23 on google-oauth
into dc79cf2 on main.

Copy link

codecov bot commented Sep 3, 2025

Codecov Report

❌ Patch coverage is 80.93023% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.90%. Comparing base (2539324) to head (742de23).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
pkg/auth/token.go 80.93% 28 Missing and 13 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1590      +/-   ##
==========================================
+ Coverage   33.42%   33.90%   +0.48%     
==========================================
  Files         216      217       +1     
  Lines       26716    27071     +355     
==========================================
+ Hits         8929     9178     +249     
- Misses      17138    17212      +74     
- Partials      649      681      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Google doesn't follow the usual RFC 7662 format but instead uses their
own. This PR adds support for parsgin their format if using a well-known
Google endpoint.

To test:
 - Go to Google OAuth 2.0 Playground
 - Select the scopes you want (e.g. `https://www.googleapis.com/auth/userinfo.email`)
 - Click "Authorize APIs" and complete the OAuth flow

You'll get an access token that you can copy and use in the inspector.

Fixes: #1411
Copy link
Contributor

@yrobla yrobla left a comment

Choose a reason for hiding this comment

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

i could not test with tailscale, their server is broken. But code looks good to me

@jhrozek jhrozek merged commit b2d6abd into main Sep 5, 2025
19 checks passed
@jhrozek jhrozek deleted the google-oauth branch September 5, 2025 09:51
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.

Check if the opaque tokens support works with Google token introspection
3 participants