简体   繁体   中英

Android installed app: Revoking OAuth2 access to Google Account

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM