AuthResource
auth.AuthResource
Methods
authenticate
authenticate(payload
, customHeaders?
): ResponsePromise
<StoreAuthRes
>
Parameters
authentication payload
customHeaders
Record<string, any>RequiredDefault: `{}`
Returns
Description
Authenticates a customer using email and password combination
deleteSession
deleteSession(customHeaders?
): ResponsePromise
<void
>
Parameters
customHeaders
Record<string, any>RequiredDefault: `{}`
Returns
ResponsePromise
<void
>
Description
Removes authentication session
exists
exists(email
, customHeaders?
): ResponsePromise
<StoreGetAuthEmailRes
>
Parameters
email
stringRequiredis required
customHeaders
Record<string, any>RequiredDefault: `{}`
Returns
ResponsePromise
<StoreGetAuthEmailRes
>
Description
Check if email exists
getSession
getSession(customHeaders?
): ResponsePromise
<StoreAuthRes
>
Parameters
customHeaders
Record<string, any>RequiredDefault: `{}`
Returns
Description
Retrieves an authenticated session Usually used to check if authenticated session is alive.
getToken
getToken(payload
, customHeaders?
): ResponsePromise
<StoreBearerAuthRes
>
Parameters
customHeaders
Record<string, any>RequiredDefault: `{}`
Returns
ResponsePromise
<StoreBearerAuthRes
>
Description
Retrieves a new JWT access token
Was this section helpful?