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
rp_st
07/20/2022, 7:29 PM
Hey @dedox7576 this is a perfectly good way to do it 🙂
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).