I want to redirecting the user after they reset their password

In Universal Login → password reset page, I hope to automatically redirect to the login page after the user successfully modifies the password,and this feature is also given in the document,But my page didn’t redirect,this is my code

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>Change your password</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  </head>
  <body>
    <div class="web-login">
      <div class="login-layout">
        <div id="change-password-widget-container"></div>
      </div>
    </div>

    <script src="https://cdn.auth0.com/js/change-password-1.5.min.js"></script>

    <script>
      // https://auth0.com/docs/customize/universal-login-pages/customize-password-reset-page
      new Auth0ChangePassword({
        container: 'change-password-widget-container', // required
        email: '{{email | escape}}', // DO NOT CHANGE THIS
        csrf_token: '{{csrf_token}}', // DO NOT CHANGE THIS
        ticket: '{{ticket}}', // DO NOT CHANGE THIS
        password_policy: '{{password_policy}}', // DO NOT CHANGE THIS
        password_complexity_options: '{{password_complexity_options}}', // DO NOT CHANGE THIS
        theme: {
          icon: "{{tenant.picture_url | default: '//cdn.auth0.com/styleguide/1.0.0/img/badge.png'}}",
          primaryColor: "{{tenant.colors.primary | default: '#ea5323'}}"
        },
      });
      const submitBtn = document.getElementsByClassName('auth0-lock-submit')[0];

      // add listener to the submit button
      submitBtn.addEventListener('click', () => {
        // some verifications...
      });
    </script>
  </body>
</html>

Hi @shanh,

Do you have the redirect to param set?

https://manage.auth0.com/#/emails > Change Password > Redirect To

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.