Thanks for the reply @gerald.czifra. But I am still confused.
It’s not clear for me what is the primary input for the flow, so to say.
For example, I have added Azure AD connection with enabled HRD.
My expectation was that this connection will be used >>>ONLY<<< for the Apllication for which it is enabled, and other applications will use only Connections enabled for them. even for the same user identifiers (same email):
App A (with enabled AzureAD connection) + me@myorg.com -> Azure AD
App B (with Db Connection) + me@myorg.com -> Db Connection
However, this is not the case, all applications are affected. WTF?
I simply cannot build a proper mental model for this process.
I understand that Auth0 needs a Connection to authenticate a user.
Both Applications
and Organizations
reference Connections
.
My assumption is that both of them participate in determining the Connection:
- The user logs into a particular application, so Auth0 can filter out all connections disabled for this application.
- The user enters their
Identifier
, and Auth0 looks for the connection with enabled HRD among those remaining after step 1.
If, after step 2, there are still several connections to choose from, we could use the Organization to filter out all connections not available for the Organization (the flow where the user must enter their organization name first).
If, after step 2, we end up with a single connection but it is shared between multiple organizations, Auth0 can ask the user to choose the organization to log in to (another login flow).
The fact that the Login Flow is selected at the application level implicitly confirms this assumption.
As we may see from the actual behavior of Auth0, something is off in my reasoning, I’d appreciate if you clarified things.
Let me also describe the final result we want to achieve.
We are going to provide a SaaS platform for companies (Organizations).
Every user must be a member of an organization.
Each organization CAN set up its own Enterprise connection, but it should also be able to onboard freelancers—users who do not have an Enterprise account.
Freelancers CAN work for multiple organizations, so we’d prefer them to be able to choose the organization when they log in.
We are going to use:
Identifier First
authentication profile.
- One shared Database Connection for all Organizations.
- Individual Enterprise Connection with enabled HRD per each Organization.
- Login Flow:
Promt for Credentials
.
It looks like this setup is going to provide us what we need.
But I do not get why Authentication Profile
is a global thing whereas a Login Flow
is a setting of the Application or why HRD enabled on the connection affects all the applications.