zquestz / omniauth-google-oauth2

Oauth2 strategy for Google
1.47k stars 414 forks source link

POST to https://www.googleapis.com/oauth2/v3/tokeninfo intead of GET #457

Closed flux-ricky closed 3 months ago

flux-ricky commented 5 months ago

To avoid leaking access tokens in logs or traces from the client application.

I struggled to find specific documentation that this endpoint (https://www.googleapis.com/oauth2/v3/tokeninfo) can receive GET and POST, if anyone knows where to find API docs for these endpoints that would be assuring.

I've lightly tested the fork in my own organisation and it appears to work as expected. I verified the change by using application traces which record metadata about HTTP requests made and I saw the expected change and no more leakage of the access token.

Before:

image

After:

image
zquestz commented 3 months ago

This looks great. Thx. I do wish there were some clear docs though. =\