2

I've installed an Android application. The first time I ran it an OAuth2 window showed up asking me whether I wanted to grant the application access to some scope within my user account.

However now I've gone to https://accounts.google.com/b/0/IssuedAuthSubTokens?hl=en and revoked access, but my application still runs normally without asking me the question of whether to allow it access to my account or not.

The application is the sample Auth activity that comes with Google Play extras.

What can I do to get the application to display the question in a popup window again? I've tried uninstalling and reinstalling but I cannot get that window back and I need it for testing purposes.

Thanks.

Jason Posit
  • 1,323
  • 1
  • 16
  • 36

1 Answers1

3

Try to programmatically revoke the token by making a request to - https://accounts.google.com/o/oauth2/revoke and include the token as a parameter. Something like this ::

curl https://accounts.google.com/o/oauth2/revoke?token={token}

The token can be an access token or a refresh token. If the token is an access token and it has a corresponding refresh token, the refresh token will also be revoked.

If the revocation is successfully processed, then the status code of the response is 200. For error conditions, a status code 400 is returned along with an error code.

The error code will give you an idea if the revocation was successful or not.

divyanshm
  • 6,600
  • 7
  • 43
  • 72
  • Thanks. The reason for the error appears to be it takes some time for the google servers to propagate the update in the permissions. – Jason Posit May 16 '13 at 12:19
  • You're welcome. Frankly, I'm a little surprised if this is the case. From what I know, there is generally a central authorization server managing the permissions and tokens. All APIs also refer to this server to confirm authentication by a user. – divyanshm May 16 '13 at 12:34
  • @divyanshm Can you look at this [SO question](http://stackoverflow.com/questions/40058425/how-to-revoke-google-account-access-within-my-android-app). I am unable to revoke access using GoogleSignInApi. Please help. – MSS Oct 15 '16 at 11:40