# Auth0 Lock - Displaying email instead of username for Salesforce users

**URL:** <https://community.auth0.com/t/auth0-lock-displaying-email-instead-of-username-for-salesforce-users/6545>\
**Category:** Get Help\
**Tags:** lock\
**Created:** [May 9, 2017, 1:47pm UTC](https://community.auth0.com/t/auth0-lock-displaying-email-instead-of-username-for-salesforce-users/6545 "2017-05-09T13:47:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob.wang](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jacob.wang](https://community.auth0.com/u/jacob.wang)\
**Post date:** [May 9, 2017, 1:47pm UTC](https://community.auth0.com/t/auth0-lock-displaying-email-instead-of-username-for-salesforce-users/6545/1 "2017-05-09T13:47:55Z")

</div>

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.

> **[Lock Configuration Options - Auth0 Docs](https://auth0.com/docs/libraries/lock/lock-configuration)**
>
> Lock has many configurable options that allow you to change the behavior, appearance, and connectivity of the Lock widget - this resource provides the details on those options for you!

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?

* * *

**Update** :

In this example, my login username is actually [jacob.dev@company.com](mailto:jacob.dev@company.com), but it’s showing me the email. If I click the button the `login_hint` parameter sent to Salesforce is incorrect.

![alt text][1]

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [May 10, 2017, 12:25pm UTC](https://community.auth0.com/t/auth0-lock-displaying-email-instead-of-username-for-salesforce-users/6545/2 "2017-05-10T12:25:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [May 10, 2017, 3:31pm UTC](https://community.auth0.com/t/auth0-lock-displaying-email-instead-of-username-for-salesforce-users/6545/3 "2017-05-10T15:31:30Z")

</div>

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: "" } } };

lock.show(options);

```

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.

---

<div class="post-metadata">

**Author:** ![jacob.wang](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jacob.wang](https://community.auth0.com/u/jacob.wang)\
**Post date:** [May 11, 2017, 6:36am UTC](https://community.auth0.com/t/auth0-lock-displaying-email-instead-of-username-for-salesforce-users/6545/4 "2017-05-11T06:36:16Z")

</div>

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

---

<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:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/auth0-lock-displaying-email-instead-of-username-for-salesforce-users/6545/5 "2018-03-02T05:53:47Z")

</div>


