Class: AuthResource
Hierarchy
default
Copy to Clipboard↳
AuthResource
Copy to Clipboard
Methods
authenticate
▸ authenticate(payload
Copy to Clipboard, customHeaders?
Copy to Clipboard): ResponsePromise
Copy to Clipboard<StoreAuthRes
Copy to Clipboard>
Description
Copy to Clipboard
Authenticates a customer using email and password combination
Parameters
Name | Type | Description |
---|---|---|
payload Copy to Clipboard | StorePostAuthReq Copy to Clipboard | authentication payload |
customHeaders Copy to Clipboard | Record Copy to Clipboard<string Copy to Clipboard, any Copy to Clipboard> |
Returns
ResponsePromise
Copy to Clipboard<StoreAuthRes
Copy to Clipboard>
Defined in
medusa-js/src/resources/auth.ts:16
deleteSession
▸ deleteSession(customHeaders?
Copy to Clipboard): ResponsePromise
Copy to Clipboard<void
Copy to Clipboard>
Description
Copy to Clipboard
Removes authentication session
Parameters
Name | Type |
---|---|
customHeaders Copy to Clipboard | Record Copy to Clipboard<string Copy to Clipboard, any Copy to Clipboard> |
Returns
ResponsePromise
Copy to Clipboard<void
Copy to Clipboard>
Defined in
medusa-js/src/resources/auth.ts:25
exists
▸ exists(email
Copy to Clipboard, customHeaders?
Copy to Clipboard): ResponsePromise
Copy to Clipboard<StoreGetAuthEmailRes
Copy to Clipboard>
Description
Copy to Clipboard
Check if email exists
Parameters
Name | Type | Description |
---|---|---|
email Copy to Clipboard | string Copy to Clipboard | is required |
customHeaders Copy to Clipboard | Record Copy to Clipboard<string Copy to Clipboard, any Copy to Clipboard> |
Returns
ResponsePromise
Copy to Clipboard<StoreGetAuthEmailRes
Copy to Clipboard>
Defined in
medusa-js/src/resources/auth.ts:47
getSession
▸ getSession(customHeaders?
Copy to Clipboard): ResponsePromise
Copy to Clipboard<StoreAuthRes
Copy to Clipboard>
Description
Copy to Clipboard
Retrieves an authenticated session Usually used to check if authenticated session is alive.
Parameters
Name | Type |
---|---|
customHeaders Copy to Clipboard | Record Copy to Clipboard<string Copy to Clipboard, any Copy to Clipboard> |
Returns
ResponsePromise
Copy to Clipboard<StoreAuthRes
Copy to Clipboard>