mongodb - What is the proper way to implement auth0 with express -
we working on project auth0 login , user management. main backend implemented on expressjs mongodb. have implemented auth0 , works great backend well. wanted know proper way link user on our mongodb user on auth0 db
since unique "user_id" assigned each user on auth0, should create user id in mongodb , each api call client(mobile app) sends auth0 access token in header.
for getting reference user sent request, should client(mobile app) store "user_id" , send api request or can "user_id" access token.
was thinking sending user_id each api request undermines purpose of auth0 , might security issue
please suggest proper way implement this
i have no experience auth0, "sub" claim in access token should contain user id.
i use user id of auth0 id in custom database , take "sub" claim access token.
Comments
Post a Comment