echoing-computer-87366
05/16/2021, 7:21 AMsub
which is a unique identifier for that particular logged in user. Now I wanted to know should I store this sub
field in mongo database schema for getting user specific data? for example if user creates some resources when logged In. Then while fetching data using /GET route I can use mongo query db.find({sub: xyz})
and retrieve the data for that specific user. Is this correct implementation of storing sub
field in database schema or do you think this can be improved? Please suggest thanksmagnificent-solstice-42554
05/16/2021, 7:30 AMsub
is the user's id (as generated by auth0).
You can also use a combination of sub
+ email
.echoing-computer-87366
05/16/2021, 8:43 AMglamorous-mouse-696
05/16/2021, 10:39 AMechoing-computer-87366
05/16/2021, 11:25 AMechoing-computer-87366
05/16/2021, 12:09 PM