Our project is developed using DDD. We decided to move user identity to a single microservice that will be used to check user identity, issue and validate tokens.
Now, since accounts and users are located in a different microservice that is solving the problem of handling user and account details, we encountered a challenge called eventual consistency.
The question for us is should we first create account/users in accounts and users microservice and then publish event to user identity microservice or vice versa.
In first case, we will have account and users basic information immediately available, but no users will be able to login since no tokens can be provided due to eventual consistency delay.
In second case, user could login, but when he logs-in into his account, no account information will be available due to eventual consistency delay. For this case there is workaround of sending a confirmation mail when eventual consistency is met, so the user can confirm registration and login.
I would like to hear a feedback, which case makes more sense, and are there any problems I dont see at this point?