# Forgot password link in lock.js not working

**URL:** <https://community.auth0.com/t/forgot-password-link-in-lock-js-not-working/87218>\
**Category:** Get Help\
**Tags:** password-reset, lock\
**Created:** [July 19, 2022, 7:24pm UTC](https://community.auth0.com/t/forgot-password-link-in-lock-js-not-working/87218 "2022-07-19T19:24:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![v-lliebman](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/v-lliebman/32/35068_2.png) [@v-lliebman](https://community.auth0.com/u/v-lliebman)\
**Post date:** [July 19, 2022, 7:24pm UTC](https://community.auth0.com/t/forgot-password-link-in-lock-js-not-working/87218/1 "2022-07-19T19:24:58Z")

</div>

Hello!

I’m having a very strange issue I haven’t found anywhere else. I’m using auth0’s lock for the login of my app but the ‘don’t remember your password’ link is not working correctly. On click it reloads the page and the login modal disappears completely. I discovered that the href is set to `#`, which would explain why the page is reloading. I looked at another app that is using auth0 who has a working link and discovered that the href there is `javascript:void(0)`.

I tried setting the link with options like this `forgotPasswordLink: 'javascript:void(0)'` but it didnt work, the link doesnt do anything at all. Hilariously the following almost works. It set sets the href correctly and the modal forwards you to the prompt to enter your email so you can get an email to reset your password. But if you click the back button, I found that the href has been set once again to `#`.

```auto
       setTimeout(() => {
            const elements = document.getElementsByClassName('auth0-lock-alternative-link');
            // @ts-ignore
            for (const element of elements) {
                element.href = 'javascript:void(0)';
            }
        }, 2000)

```

 ![image](https://global.discourse-cdn.com/auth0/original/3X/d/6/d64af818045e7ee532edb648352fc4964f1042cd.jpeg)

Would love to receive any help/guidance if anyone has any thoughts. Thanks!

---

<div class="post-metadata">

**Author:** ![v-lliebman](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/v-lliebman/32/35068_2.png) [@v-lliebman](https://community.auth0.com/u/v-lliebman)\
**Post date:** [July 20, 2022, 9:00pm UTC](https://community.auth0.com/t/forgot-password-link-in-lock-js-not-working/87218/2 "2022-07-20T21:00:26Z")

</div>

This seems to be auth0 script issue. Reverting my npm auth0-lock package to 11.27.0 fixed the problem. (I was on the latest version, 11.33.2, before)

---

<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:** [November 25, 2024, 10:37pm UTC](https://community.auth0.com/t/forgot-password-link-in-lock-js-not-working/87218/3 "2024-11-25T22:37:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alex.brett](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alex.brett/32/60157_2.png) [@alex.brett](https://community.auth0.com/u/alex.brett)\
**Post date:** [November 25, 2024, 10:37pm UTC](https://community.auth0.com/t/forgot-password-link-in-lock-js-not-working/87218/4 "2024-11-25T22:37:21Z")

</div>

Thanks for sharing with the community! Keep up the good work @v-lliebman!

Best,  
Alex
