Files
medusa-store/docs/content/references/js-client/classes/AuthResource.md
Shahed Nasser a8293af8e1 fix: overlapping branch names for generated PRs of references (#2097)
* fix overlapping branch names of generated references

* regenerate references
2022-08-25 17:47:58 +03:00

2.7 KiB

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

ResponsePromise<StoreAuthRes>

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

ResponsePromise<StoreAuthRes>

Defined in

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