How to use the changepassword function

When consulting the documentation, they inform that the token is required and must be sent through the “sendResetPasswordEmail( )” function, but this function does not send a token, it only sends an email with a button that redirects to the native Wix password reset function.

I need to use this function "import { authentication } from “wix-members-frontend”;

authentication
.changePassword(newPassword, token)
.then(() => {
console.log(“Password changed successfully”);
})
.catch((error) => {
console.error(“Error changing password:”, error);
});" as in the documentation, because I want my logged-in user, within the custom member panel that I created, to be able to change their own password. How do I do this?

1 Like