Why do I need to add a userId when creating a session. Is it used as a primary key in the database o...
l
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
Hey. There can be multiple sessions per userId as well.
The reason you need to pass in a user id is so that supertokens knows what user id to embed in the session payload
l
Alright, thanks 👍