a configured instance of the ShopperLogin SDK client
random string created by client app to use as a secret in the request
Request parameters used by the authorizeCustomer
endpoint.
the location the client will be returned to after successful login with 3rd party IDP. Must be registered in SLAS.
login url, user id and authorization code if available
A helper function designed to make calls to a custom API endpoint For more information about custom APIs, please refer to the API documentation
Argument object containing data used for custom API request
Raw response or data from response based on rawResponse argument from fetch call
Creates a random string to use as a code verifier. This code is created by the client and sent with both the authorization request (as a code challenge) and the token request.
code verifier
Encodes a code verifier to a code challenge to send to the authorization endpoint
random string to use as a code verifier
code challenge
Parse out the code and usid from a redirect url
A url that contains code
and usid
query parameters, typically returned when calling a Shopper Login endpoint
An object containing the code and usid.
A single function to execute the ShopperLogin Public Client Guest Login with proof key for code exchange flow as described in the API documentation.
a configured instance of the ShopperLogin SDK client.
parameters to pass in the API calls.
Per OAuth standard, a valid app route. Must be listed in your SLAS configuration. On server, this will not be actually called
TokenResponse
A single function to execute the ShopperLogin Private Client Guest Login as described in the API documentation.
a configured instance of the ShopperLogin SDK client
client secret used for authentication
secret associated with client ID
TokenResponse
A single function to execute the ShopperLogin Private Client Registered User B2C Login with proof key for code exchange flow as described in the API documentation.
a configured instance of the ShopperLogin SDK client.
the id and password to login with.
the password of the user to login with.
the id of the user to login with.
parameters to pass in the API calls.
Per OAuth standard, a valid app route. Must be listed in your SLAS configuration. On server, this will not be actually called. On browser, this will be called, but ignored.
TokenResponse
A single function to execute the ShopperLogin Private Client Registered User B2C Login as described in the API documentation.
a configured instance of the ShopperLogin SDK client.
the shopper username and password for login and client secret for additional authentication
secret associated with client ID
the password of the user to login with
the id of the user to login with
parameters to pass in the API calls.
Per OAuth standard, a valid app route. Must be listed in your SLAS configuration. On server, this will not be actually called
TokenResponse
Logout a shopper. The shoppers access token and refresh token will be revoked and if the shopper authenticated with ECOM the OCAPI JWT will also be revoked.
a configured instance of the ShopperLogin SDK client.
parameters to pass in the API calls.
a valid access token to exchange for a new access token (and refresh token).
a valid refresh token to exchange for a new access token (and refresh token).
TokenResponse
Exchange a refresh token for a new access token.
a configured instance of the ShopperLogin SDK client.
parameters to pass in the API calls.
a valid refresh token to exchange for a new access token (and refresh token).
TokenResponse
Exchange a refresh token for a new access token.
a configured instance of the ShopperLogin SDK client.
client secret used for authentication
secret associated with client ID
parameters to pass in the API calls.
a valid refresh token to exchange for a new access token (and refresh token).
TokenResponse
Converts a string into Base64 encoding
A string to be encoded
Base64 encoded string
Generated using TypeDoc
Wrapper for the authorization endpoint. For federated login (3rd party IDP non-guest), the caller should redirect the user to the url in the url field of the returned object. The url will be the login page for the 3rd party IDP and the user will be sent to the redirectURI on success. Guest sessions return the code and usid directly with no need to redirect.