Skip to main content
POST
/
auth
/
user
/
{auth_provider}
/
reset-password
JS SDK
import Medusa from "@medusajs/js-sdk"

export const sdk = new Medusa({
  baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
  debug: import.meta.env.DEV,
  auth: {
    type: "session",
  },
})

sdk.auth.resetPassword(
  "user",
  "emailpass",
  {
    identifier: "user@gmail.com"
  }
)
.then(() => {
  // user receives token
})

Path Parameters

auth_provider
string
required

The provider used for authentication.

Example:

"emailpass"

Body

application/json

The input data necessary to generate a reset password token.

identifier
string
required

The identifier of the admin user. For example, their email address.

Example:

"admin@medusa-test.com"

metadata
object

Optional metadata to include with the reset password token generation request.

Response

OK