Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prefill option is lost after reset password #933

Closed
larsthorup opened this issue Mar 17, 2017 · 12 comments · Fixed by #945
Closed

prefill option is lost after reset password #933

larsthorup opened this issue Mar 17, 2017 · 12 comments · Fixed by #945
Assignees
Labels
bug This points to a verified bug in the code
Milestone

Comments

@larsthorup
Copy link

The prefill option does not carry through the reset password flow, so after requesting a password reset, Auth0 redirects back to the login screen but now with an empty email field. I would expect email to still be filled out, to minimize the chance of typos in the email field during login (which is why we are using prefill in the first place). See the screen shots below for details.

The issue can be reproduced with the HTML code below. Note that the clientId / domain combination that I use is configured for "Username-Password-Authentication" connection.

Browser: Seen in Chrome
OS: Seen on Windows

<script src="https://cdn.auth0.com/js/lock/10.11.0/lock.min.js"></script>
<script>
var clientId = '(my clientId)';
var domain = '(my domain)';
var options = {
  allowedConnections: [
    'Username-Password-Authentication'
  ],
  prefill: {
    email: '[email protected]'
  }
};
var lock = new Auth0Lock(clientId, domain, options);
lock.show();
</script>

login-prefill-before-reset
login-prefill-reset
login-prefill-after-reset

@luisrudge luisrudge added bug This points to a verified bug in the code S2: Inconvenient labels Mar 17, 2017
@luisrudge luisrudge added this to the v10-Next milestone Mar 17, 2017
@luisrudge luisrudge self-assigned this Mar 17, 2017
@luisrudge
Copy link
Contributor

I just opened a PR to fix this. It won't use the prefill value. It will use the actual email the user submitted. So, if you have prefill: '[email protected]' and the user changes the email input to [email protected], it will keep [email protected] when it goes back to the login page.

@larsthorup
Copy link
Author

@luisrudge Thank you! That makes perfect sense. Looking forward to try it out soon.

@luisrudge
Copy link
Contributor

This will be in the next release on Monday, if everything goes according to plan. 🎉 :shipit:

@nlake44
Copy link

nlake44 commented May 22, 2017

@larsthorup Did this fix work for you? I'm seeing that the prefill option is only filling in the forgot password email and not the login email for version 10.16.0.

@larsthorup
Copy link
Author

@nlake44 I am not actively using this feature at the moment, so I don't know.

@luisrudge
Copy link
Contributor

@nlake44 this is working. PLease open another issue with a repro project if it's not working for you.
prefill

@nlake44
Copy link

nlake44 commented May 23, 2017

@luisrudge The prefill option does what you're showing there. But from my understanding this issue was to prefill the email field upon sign in after redirect from the forgot password flow.

@luisrudge
Copy link
Contributor

@nlake44 it also does that:
prefill

@nlake44
Copy link

nlake44 commented May 23, 2017

@luisrudge Thanks for the quick response. I meant coming from the email redirect after the user has changed their password.

@luisrudge
Copy link
Contributor

Ah, right. Yeah, that is not supported 😭

@nlake44
Copy link

nlake44 commented May 23, 2017

Any suggestions on how to make it happen?

@luisrudge
Copy link
Contributor

Maybe if you edit your email template and add some info (probably the email) in the redirect link, then in your page you can check if the link exists in the url, if it exists, you add it to the prefill option. It's a long shot, but might work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants