website logo
Navigate through spaces
Chord Commerce
⌘K
Getting Started
CMS
Data
OMS
Integrations
👩‍💻Developer Tools
Shopify
Docs powered by archbee 

useAuth

The useAuth hook returns a series of methods that enable authentication with a Shopify customer account.

useAuth

isLoggedIn

Boolean indicating whether a user is currently logged in.

status

String indicating the status of authentication in Redux. This string can be used to determine if the authentication status has been verified yet, which happens asynchronously after page load.

Example:

status

getToken()

Retrieves the current Shopify customer access token.

Example:

getToken

login()

Submits the email address and password for a Shopify customer and initiates an authentication session. This method creates a Shopify customer access token.

Example:

login

logout()

Clears the authentication session. This method destroys the current Shopify customer access token.

Example:

logout

recover()

Sends a Shopify reset password email to the customer.

Example:

recover

register()

Creates a new Shopify customer and initiates an authentication session. This method creates a Shopify customer access token.

Example:

register

resetPassword()

Resets a Shopify customer’s password with an id and token from a Shopify reset password email.

Example:

resetPassword
Updated 09 Nov 2022
Did this page help you?
Yes
No
UP NEXT
useCart
Docs powered by archbee 
useAuth