Auth0 Home Blog Docs

How do you reset the password with custom UI

auth0
auth0js
password
reset-password

#1

I’m not using the widget. How do I reset the password in this case ? The documentation here: explains how to do it from the backend. However it must be possible from the front end as well.

For example to sign up I do like this:

   this.auth0.redirect.signupAndLogin({
      connection: 'Username-Password-Authentication',
      email,
      password,
      state
    }

What would be the equivalent to reset the password ?

I’ve seen this :

 this.auth0.changePassword()

If that is what I should use, then what are the parameters to be used ?


#2

If you are using Auth0.js, password reset requests can be done as follows:

  $('.change_password').click(function () {
    webAuth.changePassword({
      connection: 'db-conn',
      email:   'foo@bar.com'
    }, function (err, resp) {
      if(err){
        console.log(err.message);
      }else{
        console.log(resp);
      }
    });
  });

More information is available in the Auth0.js docs.


#3