POST
/
auth
/
user
/
{auth_provider}
/
update
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.updateProvider(
  "user",
  "emailpass",
  {
    password: "supersecret"
  },
  token
)
.then(() => {
  // password updated
})
{
"success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

auth_provider
string
required

The provider used for authentication.

Example:

"emailpass"

Body

application/json · input · object

The input data necessary for authentication. For example, for email-pass authentication, pass email and password properties.

Response

200
application/json

OK

Details on the reset password's status.