My system looks like this: I have Identity Server with database to store users, Web API with its database and UE5 client application that runs on android. The task of web api is to save and return game data related to the user (saved progress, skillet progression, etc). I am new in this matter and want to do everything right. I can't figure out how to store and handle users correctly in Web API - IS.
Obviously, the IS must store users in its database to be able to authenticate them. But it's also obvious that the API must have a user entity in order to store associated data. Assuming that user registration is IS's responsibility (I plan to write registration on the IS side, though I still haven't figured out if this is best practice?), how should I synchronize users in the IS database and the API database?
Suppose a user registers on the IS side, should I in the callback processing, register them in the API DB?
(in addition, in the future I am going to add Google authorization)
I imagine 2 bad options:
Using in IS and web API one and the same database and literally the same Users table. - Obviously there will be a lot of problems, at least with DBContext state and migrations.
Combine web API and IS into one project
It seems there should be a cleaner solution to this problem. The problem seems to be absolutely typical, but I could not find a good answer.