Associating multiple database connections with 1 app

Problem statement: I have an app that has 2 database connections enabled, both of which have their own separate users. It seems like only users from “Connection A” are able to log in.

How can I make sure users in both database connections are able to log in to my app?

Solution: Auth0 needs a hint as to which database it should attempt to log the user in against - By default, Auth0 will only use the first available database connection.

You can provide this via the connection parameter in the /authorize request indicating the name of the connection the user should be logged in against.

Alternatively, you may find it easier to use only one database connection per application, and differentiate your users via Roles and/or Organizations. If you do plan to have multiple database connections associated with 1 app, be sure that both are toggled on in the application settings → connections.


Related FAQ: