Hi!
I use Auth0 for my authentication, so my users and their data are at Auth0.
However, I also have a user table in my own database, as this is used for foreign key links to other records.
My question now is, what is the best way to create/modify users in both Auth0 and my own DB.
Specifically, let’s assume the following scenario:
I have two application in Auth0:
One app is there to manage users and the second app is the actual tool for customers.
In the app for user management, the registered users of the app (users in Auth0) should be able to create additional users for the other app.
According to my logic, these would then have to be present both in Auth0 - for authentication- and in my own DB - for data records.
But now I have read that it is generally not a good idea to request and use a token from the management API in the frontend.
Am I right in assuming that the correct solution here would be to secure the management app API with Auth0, then request a token for the other app’s management API on the server side?
What would be the best approach here?
I’m grateful for any input!