Skip to content

RevokeToken() returns void, not RevokeCredentialsResult #1900

Open
@bflykky

Description

@bflykky

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.size: sPull request size is small.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions