googleapis / googleapis/google-oauth-java-client

Revoke token via Java SDK

Open
#250 2 comments 4 reactions 0 assignees View on GitHub
type: feature request
Dominant language
Java
Stars
661
Forks
284
PR merge metrics
No merged PRs in 30d

Description

It is currently not possible to revoke a Google token using the Google Java SDK

See the documentation here:
https://developers.google.com/identity/protocols/OAuth2WebServer#tokenrevoke

There's no equivalent to the PHP `$client->revokeToken();` in Java. As far as I can tell, the only workaround is to create your own client for this API call.

This custom client then calls
```
curl -H "Content-type:application/x-www-form-urlencoded" \
https://accounts.google.com/o/oauth2/revoke?token={token}
```

As originally reported here:
https://github.com/googleapis/google-oauth-java-client/issues/20

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.