Class: AuthResource
Hierarchy
default
↳
AuthResource
Methods
authenticate
▸ authenticate(payload
, customHeaders?
): ResponsePromise
<StoreAuthRes
>
Description
Authenticates a customer using email and password combination
Parameters
Name | Type | Description |
---|---|---|
payload | StorePostAuthReq | authentication payload |
customHeaders | Record <string , any > |
Returns
Defined in
medusa-js/src/resources/auth.ts:16
deleteSession
▸ deleteSession(customHeaders?
): ResponsePromise
<void
>
Description
Removes authentication session
Parameters
Name | Type |
---|---|
customHeaders | Record <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
Name | Type | Description |
---|---|---|
email | string | is required |
customHeaders | Record <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
Name | Type |
---|---|
customHeaders | Record <string , any > |
Returns
Defined in
Was this page helpful?