Skip to main content
Skip to main content

AuthResource

auth.AuthResource

Methods

authenticate

authenticate(payload, customHeaders?): ResponsePromise<StoreAuthRes>

Parameters

payloadStorePostAuthReqRequired
authentication payload
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<StoreAuthRes>

ResponsePromiseResponsePromise<StoreAuthRes>Required

Description

Authenticates a customer using email and password combination


deleteSession

deleteSession(customHeaders?): ResponsePromise<void>

Parameters

customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<void>

ResponsePromiseResponsePromise<void>Required

Description

Removes authentication session


exists

exists(email, customHeaders?): ResponsePromise<StoreGetAuthEmailRes>

Parameters

emailstringRequired
is required
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<StoreGetAuthEmailRes>

ResponsePromiseResponsePromise<StoreGetAuthEmailRes>Required

Description

Check if email exists


getSession

getSession(customHeaders?): ResponsePromise<StoreAuthRes>

Parameters

customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<StoreAuthRes>

ResponsePromiseResponsePromise<StoreAuthRes>Required

Description

Retrieves an authenticated session Usually used to check if authenticated session is alive.


getToken

getToken(payload, customHeaders?): ResponsePromise<StoreBearerAuthRes>

Parameters

payloadStorePostAuthReqRequired
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<StoreBearerAuthRes>

ResponsePromiseResponsePromise<StoreBearerAuthRes>Required

Description

Retrieves a new JWT access token

Was this section helpful?