Showing posts with label refresh token. Show all posts
Showing posts with label refresh token. Show all posts

Thursday, November 3, 2016

Not receiving Google OAuth refresh token

The refresh_token is only provided on the first authorization from the user. Subsequent authorizations, such as the kind you make while testing an OAuth2 integration, will not return the refresh_token again.

Go to your account security settings: 
https://security.google.com/settings/security/permissions?pli=1.

Then click "Revoke Access" next to your app.
The next OAuth2 request you make will return a refresh_token.

You need "access_type=offline" & "approval_prompt=force" in all cases when you want the refresh_token.