My stack: Gatsby.js/React + Redux + Express/Node.js + MongoDB
I’ve been able to integrate universal sign-on using “auth0-js”. But I’m having trouble figuring out this part of my application.
I need to create user records in my Mongo database and associate those records with the user ID created by auth0. I’ll pass in the user ID to my Express API and look up the correct user record with it.
Currently, I don’t see any tutorials on this type of set up. And I’m not seeing any information about how I can retrieve the user ID from auth0.
What pieces do I need in place for this? And is there a better way to link mongo to auth0.