Skip to main content

revokeToken()

function revokeToken(args: RevokeTokenRequestArgs, options?: AuthOptions): Promise<boolean>;

Revokes a token using the RFC 7009 OAuth 2.0 Token Revocation standard.

This function uses HTTP Basic Authentication with client credentials and follows the RFC 7009 specification for token revocation.

Parameters​

ParameterType
argsRevokeTokenRequestArgs
options?AuthOptions

Returns​

Promise<boolean>

True if revocation was successful

Example​

await revokeToken({
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
token: 'access-token-to-revoke'
})

See​