Cleaner way to look up user?
The docs suggest using auth to get the tokenIdentifier and then look up the user in a table. Is there a clean way to share this amongst all functions, maybe even getting the user into the ctx object?
1 Reply
I wrote a post with some helpers to do just this!
https://stack.convex.dev/wrappers-as-middleware-authentication
Authentication: Wrappers as “Middleware”
Using wrapper functions like withUser can help you organize your code into middleware-like blocks that you can compose to keep your function logic con...