We have several existing applications, each having its own database (and its own users table, since different application have different customers). Each application does its own login/change password/reset password/forget password etc. Now we want to build a central authentication/authorization server with IdentityServer4 where existing applications and future new applications can all use and no longer need to do functions lie login/change password/reset password/forget password for each application again and again.
So my question is what shall we do with those existing user tables? I can see two options:
Keep existing user tables When a customer tries to login to an application, he will be redirected to the identity server and it will look up that existing user table. When a different customer of a different applications comes, it will look up a different existing user table.
Merge all those existing user tables to a single user table in the new database in identity server, and delete all those existing user tables. But in those applications, after user logged in, program might still need to access those user tables. How can we solve this problem if we merge to the new table in identity server? We cannot directly access that user table in identity server, right?
I feel option 2 is the right way to go, but don't know exactly why and how. Can anyone explain to me? Thanks.