You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gem name and version: google-api-client (~> 0.52.0)
Steps to reproduce
oauth flow without manual changes:
# Rails log output:
Redirected to https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=***-***.apps.googleusercontent.com&redirect_uri=http://localhost:8080/oauth/google_oauth2/callback&response_type=code&scope=email%20profile%20openid%20https://www.googleapis.com/auth/user.birthday.read&state=****
Response:
GET /oauth/google_oauth2/callback?state=***&code=4/0AY0e-g7jAvbTBEMJrLWpjRtgeGAyxDmLvYKj441fptaS8QGWvNuGlAnkTFRGXjSt99q1Iw&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20openid%20https://www.googleapis.com/auth/user.birthday.read&authuser=1&hd=finalforms.com&prompt=none
If we modify the consent request to include prompt=consentplus/v2 parameter (as does the oauth google playground) this provides us with a code that correctly returns a refresh token:
Upon redirecting, add the parameter so url becomes:
Environment details
Steps to reproduce
oauth flow without manual changes:
Response:
Fetching token:
debugging reveals:
Proven Fix:
If we modify the consent request to include
prompt=consent
plus/v2
parameter (as does the oauth google playground) this provides us with a code that correctly returns a refresh token:Upon redirecting, add the parameter so url becomes:
An extra screen will be added (for the birthday?) but the same code results in:
How come this seems to be the only way to get a refresh token? and why doesnt signet support this
v2
endpoint?So
The text was updated successfully, but these errors were encountered: