Alokai

revokeCustomerToken

Revoke customer token. It is used to log out the current customer.

Signature

declare function revokeCustomerToken(
	context: Context,
	customHeaders?: CustomHeaders
): Promise<FetchResult<RevokeCustomerTokenMutation>>;

Parameters

NameRequiredTypeDescription
contextRequiredContext
customHeadersOptionalCustomHeaders

Referenced Types

Examples

Simple usage if the customer is logged in and the token is valid:

import { sdk } from '~/sdk.config.ts';

// token will be invalidated and the customer will be logged out
await sdk.magento.revokeCustomerToken();

On this page