Prefill sign-in email field with lock widget

I’m using lock v10.20.0 and whenever I set a prefill value for the email it is only filled out in the sign-up form. I also need it to be set at the sign-in form.

I set the options like described in the docs: Lock Configuration Options

options = {
  prefill: {
    email: "someone@auth0.com"
  }
};

I also checked with lock v11.2.2. There the prefill is as well only set in the signup modal.
Is there a way to also prefill the login email field?

Using v11.1.2, we have been able to get this “prefill” option to work for our sign-in form using the embedded Lock. Our use case is to have the email prefilled for subsequent authentications once they have initially authenticated using it.

if (defaultUserName) {
options.prefill = {
email: Authentication.GetCurrentUserName(),
username: “”
};
}

    Cloud.AuthenticationContext = new Auth0Lock(appClientID, domainName, options);

The prefill option of Lock will set the value for both the signin and signup fields. This simple example should do the trick:

<!doctype html>
<html>
<head>
  <script src="https://cdn.auth0.com/js/lock/11.2.2/lock.min.js"></script>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <script>
	window.addEventListener('load', function() {
      var AUTH0_DOMAIN = "{{YOUR_AUTH0_DOMAIN}}";
      var AUTH0_CLIENT_ID = "{{YOUR_SPA_CLIENT_ID}}";

      var options = {
        oidcConformant: true,
        prefill: {
          email: "someone@auth0.com"
        }
      };
    
	  var lock = new Auth0Lock(AUTH0_CLIENT_ID, AUTH0_DOMAIN, options);
    
      document.getElementById('login_button').addEventListener('click', function() {
        lock.show();
	  });

      lock.on("authenticated", function(authResult) {
  	    (...)
      });
	});
  </script>
</head>
<body>
  <button id="login_button">Log In</button>
</body>
</html>

If this simple script does not show you the email prefilled in both the signin and signup fields, you can check your console log for any errors. Another option is to try it in other browsers to see if the behaviour remains.

We needed to set the username as well as the email in the lock option prefill:

options = {
   prefill: {
     email: "someone@auth0.com",
     username: "someone@auth0.com"
   }
 };

Now the email is set in the signin and signup form.