# Implement Identifier First profile with Lock.js

**URL:** <https://community.auth0.com/t/implement-identifier-first-profile-with-lock-js/91119>\
**Category:** Get Help\
**Tags:** enterprise, identifier-first, lock, login\
**Created:** [September 22, 2022, 10:15am UTC](https://community.auth0.com/t/implement-identifier-first-profile-with-lock-js/91119 "2022-09-22T10:15:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maksym.bychok](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/maksym.bychok/32/38855_2.png) [@maksym.bychok](https://community.auth0.com/u/maksym.bychok)\
**Post date:** [September 22, 2022, 10:15am UTC](https://community.auth0.com/t/implement-identifier-first-profile-with-lock-js/91119/1 "2022-09-22T10:15:50Z")

</div>

Hi. We are using Lock.js for our login page and we would like implement Identifier First similar as auth0 Universal Login. It means:  
we have two databases: our-users(users in our connection), planb-users(enterprise users, @planb.com)  
what we want:  
user enter email and click Login we should redirect to planb-users Idp if user email has enterprise domain([user-mask@planb.com](mailto:user-mask@planb.com)) otherwise show password field

---

<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:** [September 27, 2022, 12:15pm UTC](https://community.auth0.com/t/implement-identifier-first-profile-with-lock-js/91119/2 "2022-09-27T12:15:15Z")

</div>

Lock supports home realm discovery based on email domains in the scope of enterprise connections ([Select from Multiple Connection Options](https://auth0.com/docs/libraries/lock/selecting-from-multiple-connection-options#using-email-domains-with-enterprise-connections)).

However, it’s done the opposite of what you describe; the password field is shown by default and hidden if the user inputs an email address associated with an enterprise connection.

Having Lock initially show only an email field is not supported to my knowledge, so it would require you to fork the Lock library. The recommendation here would be to consider moving to the new universal login experience and enable identifier first.

As an additional note, the above is applicable for enterprise connections and at one point you mention you have two databases. If you mean they are both database connections this would not be applicable, but if they are both database connections there would not actually be an IdP to redirect to so a bit unsure about the exact use case you have.

---

<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:** [November 26, 2024, 11:43pm UTC](https://community.auth0.com/t/implement-identifier-first-profile-with-lock-js/91119/3 "2024-11-26T23:43:38Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
