logoutCustomer
Logs out the customer
This method sends a POST request to the logoutCustomer endpoint of the Vue Storefront API Middleware. In turn, it performs the SSO logout, by sending a GET request to the SSO login link with the /login.php?action=logout redirect logoutCustomer documentation.
Signature
declare function logoutCustomer(
options?: MethodOptions
): Promise<boolean>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
options | Optional | MethodOptions |
Returns
Returns void
Examples
Fetching category that matches the id from the query
import { sdk } from '~/sdk.config.ts';
const logout = await sdk.bigcommerce.logoutCustomer();