Good afternoon! I am new using Supertokens and ha...
# general
d
Good afternoon! I am new using Supertokens and have a very basic question I am working in a React + Express inventory app, and recently tested Supertoken with the EmailPassword recipe. It worked pretty well. I spinned up a MongoDB in Atlas and then I was wondering if it is ok to store the result of
req.session.getUserId()
on each db record, so when my endpoint
"../products/all"
get hitted, I can filter all the db records by UserId and return to my front-end only the products of the given user. Is this the right way to do it? Or maybe I am missing something? Thank you in advance
r
Hey @dedox7576 this is a perfectly good way to do it 🙂
d
Thank you so much 🙂
3 Views