Enumeration ShopperLoginMutations

Mutations available for Shopper Login

Enumeration Members

AuthorizePasswordlessCustomer: "authorizePasswordlessCustomer"

Allows the customer to authenticate when their identity provider is down.

Returns

A TanStack Query mutation hook for interacting with the Shopper Login authorizePasswordlessCustomer endpoint.

GetAccessToken: "getAccessToken"

Get the shopper or guest JWT access token and a refresh token. This is the second step of the OAuth 2.1 authorization code flow.

Returns

A TanStack Query mutation hook for interacting with the Shopper Login getAccessToken endpoint.

GetPasswordLessAccessToken: "getPasswordLessAccessToken"

Issue a shopper token (JWT).

Returns

A TanStack Query mutation hook for interacting with the Shopper Login getPasswordLessAccessToken endpoint.

GetSessionBridgeAccessToken: "getSessionBridgeAccessToken"

Get a shopper JWT access token for a registered customer using session bridge.

For public client id requests the grant_type must be set to session_bridge.

For private client_id and secret the grant_type must be set to client_credentials along with a basic authorization header.

Returns

A TanStack Query mutation hook for interacting with the Shopper Login getSessionBridgeAccessToken endpoint.

GetTrustedAgentAccessToken: "getTrustedAgentAccessToken"

Get a shopper JWT access token for a registered customer using a trusted agent (merchant).

If using a SLAS private client ID, you must also use an _sfdc_client_auth header.

The value of the _sfdc_client_auth header must be a Base64-encoded string. The string is composed of a SLAS private client ID and client secret, separated by a colon (:). For example, privateClientId:privateClientsecret becomes cHJpdmF0ZUNsaWVudElkOnByaXZhdGVDbGllbnRzZWNyZXQ= after Base64 encoding.

Returns

A TanStack Query mutation hook for interacting with the Shopper Login getTrustedAgentAccessToken endpoint.

GetTrustedSystemAccessToken: "getTrustedSystemAccessToken"

Get a shopper JWT access token for a registered customer whose credentials are stored using a third party system.

For external trusted-system requests, a basic authorization header that includes a SLAS client ID and SLAS client secret can be used in place of the bearer token.

For internal trusted-system requests, the bearer token must be a C2C JWT.

Returns

A TanStack Query mutation hook for interacting with the Shopper Login getTrustedSystemAccessToken endpoint.

IntrospectToken: "introspectToken"

Returns the token properties. A basic auth header with Base64-encoded clientId:secret is required in the Authorization header, as well as an access token or refresh token. Use token_type_hint to help identify the token.

Returns

A TanStack Query mutation hook for interacting with the Shopper Login introspectToken endpoint.

LogoutCustomer: "logoutCustomer"

Log out a shopper. The shopper's access token and refresh token are revoked. If the shopper authenticated with a B2C Commerce (ECOM) instance, the OCAPI JWT is also revoked. This should be called for Registered users that have logged in using SLAS. his should be called for registered users that have logged in using SLAS. This endpoint is not for use with guest users.

Required header: Authorization header bearer token of the Shopper access token to logout.

Required parameters: refresh token, channel_id, and client.

Returns

A TanStack Query mutation hook for interacting with the Shopper Login logoutCustomer endpoint.

ResetPassword: "resetPassword"

Creates a new password

Returns

A TanStack Query mutation hook for interacting with the Shopper Login resetPassword endpoint.

RevokeToken: "revokeToken"

Invalidate the refresh token. A basic auth header with Base64-encoded clientId:secret is required in the Authorization header, and the refresh token to be revoked is required in the body.

Returns

A TanStack Query mutation hook for interacting with the Shopper Login revokeToken endpoint.