Skip to main content

revokeToken()

function revokeToken(args: RevokeTokenRequestArgs, baseUrl?: string): 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
baseUrl?string

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