This repository has been archived by the owner on Nov 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 432
Revoking with the access token throws a TokenRevokeError #132
Comments
yep, it looks like the code only uses the refresh token for revocation -- we need to fall back to the access token if the refresh token isn't available. |
craigcitro
added a commit
to craigcitro/oauth2client
that referenced
this issue
Feb 17, 2015
According to the [OAuth2 docs](https://developers.google.com/accounts/docs/OAuth2WebServer#tokenrevoke), we can use either the refresh token or access token when revoking a token. If we've lost the refresh token for some reason, we should fall back to revoking via access token. (Note that if the access token has expired, this will still raise, which is the correct behavior.) Fixes googleapis#132.
craigcitro
added a commit
to craigcitro/oauth2client
that referenced
this issue
Mar 17, 2015
According to the [OAuth2 docs](https://developers.google.com/accounts/docs/OAuth2WebServer#tokenrevoke), we can use either the refresh token or access token when revoking a token. If we've lost the refresh token for some reason, we should fall back to revoking via access token. (Note that if the access token has expired, this will still raise, which is the correct behavior.) Fixes googleapis#132.
craigcitro
added a commit
to craigcitro/oauth2client
that referenced
this issue
Mar 17, 2015
According to the [OAuth2 docs](https://developers.google.com/accounts/docs/OAuth2WebServer#tokenrevoke), we can use either the refresh token or access token when revoking a token. If we've lost the refresh token for some reason, we should fall back to revoking via access token. (Note that if the access token has expired, this will still raise, which is the correct behavior.) Fixes googleapis#132.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The program tries to revoke the access and refresh tokens of a Google Analytics service.
The error occurs in credentials.revoke(), in the following snippet of code:
The credentials.access_token is set and valid and the credentials.refresh_token is set to None.
The credentials.revoke() causes an TokenRevokeError but when I want to do the same thing using the requests library, it works perfectly.
To better understand what I'm saying, here is a screenshot of when the above snippet gets executed:
The text was updated successfully, but these errors were encountered: