ian
ian2y ago

Session tracking?

What's the recommended way to do session tracking in Convex?
2 Replies
ian
ianOP2y ago
I wrote a post on adding server-side session data by storing an ID to a session document in sessionStorage on the client, and passing it as a parameter, and I wrote helpers so you don't have to explicitly pass the ID (useSessionQuery) or look up the ID on the server (queryWithSession): https://stack.convex.dev/sessions-wrappers-as-middleware
Sessions: Wrappers as "Middleware"
How to implement session storage with Convex, using some helper functions we wrote. While most of your data is associated with a user or another docum...
jamwt
jamwt2y ago
indeed quite a good article