Is there any way to fill the e-mail input on the Forgot Password page with the same value as the e-mail input on the Login page? The “prefill" Auth0Lock property does not work for me because I need to dynamically fill this input when the user switch tabs. I have been trying to do it with Javascript, but everytime I click on the input in the Forgot Password page the input value is set to empty again.
By default, the Auth0 Login and Forget Password pages dynamically fill the email address text field with the text the user had typed. Regardless of the user switching between these pages, the filled-in email text field will remain the same.
Because of this, could you clarify how you are getting this behavior?
By default the e-mail address is not being added to the Forgot Password page. I am using the Universal Login page and tried to add this behavior inside the Auth0Lock “forgot_password ready” event by getting the e-mail input value and adding to the same input on the Forgot Password page. Here’s what I did:
var username = document.querySelector('[name="username"]').value;
document.querySelector('[name="email"]').value = username;
Is there a setting that should be on the code or on the Auth0 environment for this behavior to work properly? I never worked with this platform before so there may be something that I am missing. If you need any other info please let me know!
EDIT: Even though the code above set the value to the Forgot Password e-mail input, I get an error message stating that the e-mail input should not be empty. Also, if I set the focus to the input the value is set to empty. Here’s an example:
@rueben.tiow I got in depth in the Universal Login page and figured out something interesting: the behavior to add the e-mail from the Login page to the Forgot Password page works perfectly if there’s no Connection Resolver on the code. As soon as I add the Connection Resolver it stops working, doesn’t matter what is the content inside the resolver.
I have tried replicating the behavior you described and was not able to get the same results.
Each time I was able to populate the email address in the login, signup, and forgot password pages. I was also able to press the Send Email button on the forgot password page without errors.
Because of this, could you please DM me a copy of your Universal Login Page to try to replicate the issue on my end?
AFAIK, your desired behavior should be working for all conditions by default, regardless of the connectionResolver option.
I’m currently talking to my teammates to provide you the Universal Login Page as you requested. Meanwhile, it’s important to note, if relevant, that we are using the version 11.30.0 of the Auth0Lock.
I also opened this issue regarding this problem with some examples. Feel free to ask any other questions if needed.
After my investigation, I found an interesting behavior. Originally, when I was testing, I did not encounter problems with my ULP page when I included the connectionResolver. It was an oversight on my side.
Because now, I can confirm that the connectionResolver property is influencing the behavior of the ULP page and treating the email address as a username instead of an email address.
If you try filling out an email address first in the Forgot Password Page, then navigate to the Sign Up page, you will see that it populates the username property and not the email address property.
I believe this is an issue with this beta feature.