So I have two services that run, each with their own database. S1 stores user information and other primary data. Users also login and signup via S1 endpoints. S2 stores the same user information and other data too, but this is a separate service that users can access but do not need to signup with.
I'm finding that to synchronize user data, I have to make explict calls from S2 to S1 to retrieve the most upto date user information. My way around this up until this point is to have the same JWT secret used in both applications.
This way, when a user authentications with S1 and gets a JWT in return - it calls S2 with that same JWT. If i need to sync data in S2, I will simply make calls from S2 to S1 using the JWT that was given by the user.
It feels wrong but it works, what should I really be doing here instead without overengineering?