Skip to main content

Class: AuthResource

Hierarchy

  • default

    AuthResource

Methods

authenticate

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

Description

Authenticates a customer using email and password combination

Parameters

NameTypeDescription
payloadStorePostAuthReqauthentication payload
customHeadersRecord<string, any>

Returns

ResponsePromise<StoreAuthRes>

Defined in

medusa-js/src/resources/auth.ts:16


deleteSession

deleteSession(customHeaders?): ResponsePromise<void>

Description

Removes authentication session

Parameters

NameType
customHeadersRecord<string, any>

Returns

ResponsePromise<void>

Defined in

medusa-js/src/resources/auth.ts:25


exists

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

Description

Check if email exists

Parameters

NameTypeDescription
emailstringis required
customHeadersRecord<string, any>

Returns

ResponsePromise<StoreGetAuthEmailRes>

Defined in

medusa-js/src/resources/auth.ts:47


getSession

getSession(customHeaders?): ResponsePromise<StoreAuthRes>

Description

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

Parameters

NameType
customHeadersRecord<string, any>

Returns

ResponsePromise<StoreAuthRes>

Defined in

medusa-js/src/resources/auth.ts:36