Why do I need to add a userId when creating a session. Is it used as a primary key in the database or can there be multiple sessions with the same userId?
r
rp_st
01/20/2023, 7:10 PM
Hey. There can be multiple sessions per userId as well.
rp_st
01/20/2023, 7:10 PM
The reason you need to pass in a user id is so that supertokens knows what user id to embed in the session payload
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).