Handle multiple applications user auth under single auth0 tenant

There are multiple applications (Service A, B, C, etc) and each application has its own database for user authentication. and there are some duplicate users in different services( for example, user @jon.doe exists both in service A and B). and I want to take the advantage of the power of SSO that Auth0 offers so that I can handle all users authentication under the same tenant. and here’s my initial approach

  1. Auto migration through custom DB connection
    I’ve learned that user data can be transferred to auth0 from custom DB when they first login through custom script and this was completed. and my assumption was once we have user data in auth0, they are able to login through one universal login page. however, later I found out that user auth only works within the same connection, meaning that each user migrated from Service A and B can’t be logged in through one universal auth0 login screen because their connections are different. Is there a way to solve this issue?

  2. Handle Authentication in the backend
    Rather than handling user auth in front-end with auth0 universal login page, handling it in the backend can be another option. user still inputs their credentials in current app’s login page (not in auth0 SSO page) and make a post call to auth0 api to authenticate users. however, in this case I’m not sure how to perform auto migration and whether this is a good approach for handling user auth in other applications as well

my goal is to have a central DB (whether that’s Auth0 or 3rd party connected to auth0) that have all users data migrated from multiple applications and handle their auth under auth0

cc. do you have any thoughts on this @lihua.zhang ?

Thanks for the information, I will try to figure it out for more.