updateProvider - JS SDK Auth Reference
This documentation provides a reference to the sdk.auth.updateProvider
method used to send requests to Medusa's Authentication API routes. It can be used for admin users, customers, or custom actor types.
This method is used to update user-related data authentication data.
More specifically, use this method when updating the password of an admin user, customer, or custom actor type after requesting to reset their password with resetPassword.
This method sends a request to this API route.
Related guide: How to allow customers to reset their passwords in a storefront.
Example#
Parameters#
actor
stringThe actor type. For example,
user
for admin user, or customer
for customer.provider
stringThe authentication provider to use. For example,
emailpass
.The data necessary to update the user's authentication data. When resetting the user's password,
send the
password
property.token
stringReturns#
Promise
Promise<void>This method is used to update user-related data authentication data.
More specifically, use this method when updating the password of an admin user, customer, or
custom actor type after requesting to reset their password with resetPassword.
This method sends a request to this API route.
Related guide: How to allow customers to reset their passwords in a storefront.
Was this page helpful?