Auth0 Home Blog Docs

Set a default/fallback enterprise connection for all unrecognized emails

lock
enterprise

#1

Specifically, I’m trying to create an enterprise connection that will be used if no other connection is found to support a specific domain.

For example, we have 2 enterprise connections:

  • ad-1: supports the domains @domainA.com and @domainB.com.

  • ad-2: supports all other domains.

How can I get this setup using the Lock widget? I tried to set the “defaultEnterpriseConnection” property to ad-2 but when I try to enter an email address that isn’t supported by ad-2, I get an error that says “Please use your corporate email to login.”.

I know I could add all the individual domains to ad-2, but it would be great if I can get away from having to add to that every time we add new users to that AD.


#3

Hey @omar.dfin, there’s no built-in way in the connections to do this, but you can play around Lock’s connectionResolver hook and see if you can implement the logic there: https://github.com/auth0/lock#other-options


#4

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