googleapis / googleapis/google-cloud-node
`RevokeToken()` returns `void`, not `RevokeCredentialsResult`
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 712
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 99
Description
Hello,
While using the google-auth-library-nodejs, I noticed a discrepancy between the documented behavior and the actual implementation.
**The library provides a method for revoking an access or refresh token obtained during OAuth communication**. The method is defined as follows:
```TypeScript
revokeToken(token: string): GaxiosPromise;
// ...
export interface RevokeCredentialsResult {
success: boolean;
}
```
According to this definition, calling `revokeToken()` should return the `RevokeCredentialsResult` instance within the `data` property of the response. However, in actual usage, the `success` property was undefined. Upon inspecting the full response, the `data` property itself was an empty object `{}`.
When I tested the Revoke Token API using the **`OAuth 2.0 Playground`**, the response body was also empty. Based on this, I suspect one of the following:
1. **Library Issue: The API spec might not include a response body, but the library mistakenly expects one.**
2. API Issue: The API spec might include a response body, but the current API implementation omits the success property.
**If it turns out to be the first case, I would be honored to contribute by fixing the issue myself.** Please let me know if you can provide any clarification on this. Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.