Skip to main content

Class: AuthResource

Hierarchy

  • Copy to Clipboard

    Copy to Clipboard

Methods

authenticate

authenticate(Copy to Clipboard, Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Copy to Clipboard

Authenticates a customer using email and password combination

Parameters

NameTypeDescription
Copy to ClipboardCopy to Clipboardauthentication payload
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

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


deleteSession

deleteSession(Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Copy to Clipboard

Removes authentication session

Parameters

NameType
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

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


exists

exists(Copy to Clipboard, Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Copy to Clipboard

Check if email exists

Parameters

NameTypeDescription
Copy to ClipboardCopy to Clipboardis required
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

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


getSession

getSession(Copy to Clipboard): Copy to Clipboard<Copy to Clipboard>

Copy to Clipboard

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

Parameters

NameType
Copy to ClipboardCopy to Clipboard<Copy to Clipboard, Copy to Clipboard>

Returns

Copy to Clipboard<Copy to Clipboard>

Defined in

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