For now I have a mobile app (M), a single web api (A), and an Identity 4 server (I).
I am aiming for a microservices DDD approach.
Should my Identity server own the user profiles (for signup/signin) in its own database, or should my API have them in its database?
Let scenario 1 be that Identity owns them, and scenario 2 be that the API owns them.
It seems to me scenario 1 makes sense, but my assumptions on the issue are the following:
Scenario 1, signup:
I have one round trip to Identity.
M -> I -> M
Scenario 1, signin:
I have one round trip to Identity.
M -> I -> M
Scenario 2, signup:
I have a trip like
M -> A -> M
Scenario 2, signin:
The mobile app talks to Identity, which asks the API to check the user, and on success sends the tokens back to the mobile app.
M -> I -> A -> I -> M
or the mobile app talks to the API which upon success gets the tokens from Identity and then sends them back to the mobile app.
M -> A -> I -> A -> M