resetPassword - JS SDK Auth Reference
This documentation provides a reference to the sdk.auth.resetPassword
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 requests a reset password token for an admin user, customer, or custom actor type. It sends a request to the Generate Reset Password Token API route.
To reset the password later using the token delivered to the user, use the updateProvider method.
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
.body
objectThe data required to identify the user.
body
objectReturns#
Promise
Promise<void>This method requests a reset password token for an admin user, customer, or custom actor type.
It sends a request to the Generate Reset Password Token API route.
To reset the password later using the token delivered to the user, use the updateProvider method.
Related guide: How to allow customers to reset their passwords in a storefront.
Was this page helpful?