# Forgot password link in customized login page

**URL:** <https://community.auth0.com/t/forgot-password-link-in-customized-login-page/154116>\
**Category:** Get Help\
**Tags:** reset-password-prompt-classic-experience, login-experience\
**Created:** [November 26, 2024, 9:13pm UTC](https://community.auth0.com/t/forgot-password-link-in-customized-login-page/154116 "2024-11-26T21:13:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![laynier.piedra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/laynier.piedra/32/60012_2.png) [@laynier.piedra](https://community.auth0.com/u/laynier.piedra)\
**Post date:** [November 26, 2024, 9:13pm UTC](https://community.auth0.com/t/forgot-password-link-in-customized-login-page/154116/1 "2024-11-26T21:13:54Z")

</div>

I customized the login page, however **I do not know what href or action url use to redirect users to password reset page**. Neither I see it in documentation. I tried using an href directly in the link and it says that tenant param is missing. After that I made a form in a function for the onClick event of the element, but it returns 404.  
This is the last very basic way I tried:

```auto
function submitForm() {
    if (typeof config !== 'undefined' && config.clientID) {
        const clientId = config.clientID;

        const tenant = config.auth0Tenant;

        const form = document.createElement("form");
        form.method = "POST";
        form.action = `https://${tenant}.us.auth0.com/lo/reset`;

        const tenantField = document.createElement("input");
        tenantField.type = "hidden";
        tenantField.name = "tenant";
        tenantField.value = tenant;
        form.appendChild(tenantField);

        const clientIdField = document.createElement("input");
        clientIdField.type = "hidden";
        clientIdField.name = "client_id";
        clientIdField.value = clientId;
        form.appendChild(clientIdField);

        document.body.appendChild(form);
        form.submit();

    }
}

```

🙄  
I read in other questions that setting ‘Content-Type’: ‘application/x-www-form-urlencoded’ could work however this is the default type in a post request, so I tried with a **fetch request** to try that and error was what I received. 😓  
I just need that users click on forgot password link and then they see the password reset window 🙏

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 26, 2024, 11:01pm UTC](https://community.auth0.com/t/forgot-password-link-in-customized-login-page/154116/3 "2024-11-26T23:01:32Z")

</div>

Hi @laynier.piedra,

Welcome to the Auth0 Community!

If you are using the New Universal Login page, your users should be able to click on the forgot password option to trigger a password reset email sent to their email address.

However, if you prefer to send the user a password reset email instead, you could make a POST request to the `/dbconnections/change_password` endpoint.

```auto
POST https://{yourDomain}/dbconnections/change_password
Content-Type: application/json
{
  "client_id": "{yourClientId}",
  "email": "EMAIL",
  "connection": "CONNECTION",
  "organization": "ORGANIZATION_ID"
}

```

(Reference: [Authentication API Explorer](https://auth0.com/docs/api/authentication#change-password))

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![laynier.piedra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/laynier.piedra/32/60012_2.png) [@laynier.piedra](https://community.auth0.com/u/laynier.piedra)\
**Post date:** [November 27, 2024, 7:12pm UTC](https://community.auth0.com/t/forgot-password-link-in-customized-login-page/154116/4 "2024-11-27T19:12:45Z")

</div>

🙄 How do you access user email from there? @@coonfig@@ var does not have it

{  
“client\_id”: “{yourClientId}”,  
“email”: “EMAIL”,  
“connection”: “CONNECTION”,  
“organization”: “ORGANIZATION\_ID”  
}

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 5, 2024, 12:05am UTC](https://community.auth0.com/t/forgot-password-link-in-customized-login-page/154116/5 "2024-12-05T00:05:51Z")

</div>

Hi @laynier.piedra,

If you call the `/dbconnections/change_password` endpoint, you must supply the user’s email address yourself.

When using Lock in the customized login page, you can get the email address if it was passed in the `login_hint` query parameter. Then you can do something like:

```auto
email: loginHint

```

Let me also add that you can implement the forgot password link using the `allowForgotPassword` option. See [Lock Configuration Options](https://auth0.com/docs/libraries/lock/lock-configuration#allowforgotpassword-boolean-).

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 13, 2025, 6:57pm UTC](https://community.auth0.com/t/forgot-password-link-in-customized-login-page/154116/6 "2025-01-13T18:57:15Z")

</div>

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