revokeCredentials
: Revokes access token and clears the credentials object
revokeToken
: Revokes the access given to token.
What's the difference? There is no doc and sample for explaining these two methods here.
This ain't well documented.
revokeToken
requires you pass a specific accessToken
to the method:
https://github.com/googleapis/google-auth-library-nodejs/blob/master/src/auth/oauth2client.ts#L801
revokeCredentials
accepts no arguments, and revokes the access token currently configured in the OAuth2
instance:
https://github.com/googleapis/google-auth-library-nodejs/blob/master/src/auth/oauth2client.ts#L827
Hope this helps!