Auth0 Lock - Displaying email instead of username for Salesforce users

Currently if a user has recently logged in, It displays a button with the (supposedly) login username of the user. By default it seems to use display the user’s email.

However for Salesforce users, a user’s email and the username they used to login are completely separate and are often different. Currently Auth0 lock is displaying and prefill the Salesforce login form with the user’s email, which is incorrect.

I tried changing the username style but it isn’t working. Is there a configuration somewhere that I need to add/fix for this to work?


In this example, my login username is actually, but it’s showing me the email. If I click the button the login_hint parameter sent to Salesforce is incorrect.

![alt text][1]

Do you mean the Last time you logged in with... button? Can you please clarify the specific button, updating your question with a screenshot would help.

The information shown on the Last time you logged in with section will show the user email or, if an email is not available, the user name. To my knowledge, this is not configurable.

In addition to displaying that value in that section, Lock will then use that same information as the value of the login_hint parameter. However, this default behavior for the login_hint parameter can be overridden.

With the following configuration:

var options = { auth: { params: { login_hint: "" } } };;

the login_hint will now be sent with an empty value instead of using the same value displayed in the Last time you logged in with section. If you’re in a position to programmatically know a more specific login hint then you could use that value instead, however, using an empty string should at least prevent that the Salesforce login form be filled with incorrect information.

I guess I can work with that. Thanks for your help.