Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RevokeToken() returns void, not RevokeCredentialsResult #1900

Open
bflykky opened this issue Dec 16, 2024 · 0 comments
Open

RevokeToken() returns void, not RevokeCredentialsResult #1900

bflykky opened this issue Dec 16, 2024 · 0 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. size: l Pull request size is large. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bflykky
Copy link

bflykky commented Dec 16, 2024

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:

revokeToken(token: string): GaxiosPromise<RevokeCredentialsResult>;

// ...

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!

@bflykky bflykky changed the title RevokeToken() does return void, not the 'RevokeCredentialsResult'. question: RevokeToken() does return void, not the 'RevokeCredentialsResult'. Dec 17, 2024
@d-goog d-goog added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p3 Desirable enhancement or fix. May not be included in next release. priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p3 Desirable enhancement or fix. May not be included in next release. labels Dec 18, 2024
@d-goog d-goog changed the title question: RevokeToken() does return void, not the 'RevokeCredentialsResult'. RevokeToken() does return void, not the 'RevokeCredentialsResult'. Jan 11, 2025
@d-goog d-goog changed the title RevokeToken() does return void, not the 'RevokeCredentialsResult'. RevokeToken() returns void, not RevokeCredentialsResult Jan 11, 2025
@sofisl sofisl added the size: l Pull request size is large. label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. size: l Pull request size is large. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants