Alokai
You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x

signUserOut

Method terminating an authenticated user session in SAP Commerce Cloud.

This method sends a POST request to the OAuthUserRevoke endpoint of the Alokai Middleware. In turn, in calls the of the SAP OAuth server to invalidate the access token stored as the vsf-sap-token browser cookie. It also removes the cookie automatically afterwards.

You might also want to see the signUserIn method.

Signature

export declare function signUserOut(
	options?: MethodOptions
): Promise<void>;

Parameters

NameRequiredTypeDescription
optionsOptionalMethodOptionsOptions that can be passed to additionally configure the request or customize the logic in a plugin.

Returns

This method does not return anything.

Referenced Types

Examples

Signing a user out.

import { sdk } from '~/sdk';

const tokenResponse = await sdk.commerce.signUserOut();

On this page