I have an Angular front end (using Auth0’s single page application) and a nodejs API backend (trying to implement Auth0’s API functionality). My backend communicates with a MYSQL database for the project functionality.
I’m hoping to understand a few things:
How is it expected that an Angular Frontend and a Nodejs Backend API share a user when you sign in?
You can certainly go the rule/action route - That is, inspect the user profile on login for some some of reference to your external DB, and if it does not exist then make the necessary calls to your backend.
Alternatively, you could use the ID token returned in the initial authentication exchange to create the user in your DB. Here’s a similar topic which should help:
You should be able to avoid a call the Management API altogether if you use the ID Token as mentioned previously.