Auth0 Home Blog Docs

Forgot password with custom email template


Hi ,
I have implemented auth0 sent email functionality for forgot password. Its working fine in which I have customise email template with our application link. please find below code snippet for that

var webAuth0 = new auth0.WebAuth({
        domain:       '[tenant]',
        clientID:     '0EvIxFA6k***********qlaZGxO72K'
        connection: 'Username-Password-Authentication',
      }, function (err, resp) {
          that.emailSent = true;

But I am unable to find any api/sdk in auth0 so that I can reset password without authToken. I have tried with “/dbconnections/change_password” with passing password in request but its not working.

Please help me on how to reset password for a user who forgot his password, for that access token is not available.

Bad Audience when using a custom API


Any user that forgot their password can conveniently click on forgotten password link in Lock widget to receive a password-reset email.

Alternatively, if you want to use API, one of these options:

  1. User-initiated change password, that sends an Email to user with a link:

  2. As a superuser with valid access_token to management API, PATCH user:!/Users/patch_users_by_id

  3. As a superuser with valid access_token to management API, generate a password reset link for given user:!/Tickets/post_password_change

Hope that helps,