My admin dashboard users are in mongodb in authentication server(expressjs ts) but my apps users are in postgresql in another server(Django). I have made once service that is used to create events. but the problem is I want to know who created the event. as the event can be created by both admin users and app users.
I am currently using jwt with same secret in both servers and using bearer token to authenticate the user. So far it’s working as I am storing the id and name of users in event model. here the id of admin will be from mongodb and id of app user will be from postgresql. Is there a correct way to do this?
learning_to_code is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.