Hey all,
I’m working on an Auth0 integration with two roles: admin (who has full access to the application without belonging to any organization) and customer_admin (who belongs to an organization). The admin role can be created directly, but customer_admins are registered through invitations. To manage this, I have set up two DB connections:
- Username-Password-Authentication: Used for admins (sign-up is disabled here).
- Username-Password-Invitation: Used for customer_admins (sign-up is allowed here but only via invitation).
Initially, I implemented a custom login page where, after the user enters their email, I hit an endpoint to get the user’s connection, then redirect them to the appropriate connection for login.
However, I’m now considering switching to an identity-first flow, which seems to streamline the process. My concern is that the login and password fields currently only work with the “Username-Password-Authentication” connection. Is there a way to determine the user’s primary connection after they enter their email and log them in using that primary connection?
Any guidance would be greatly appreciated!
Thanks in advance!