How do I actually validate that it’s a particular user logged in
So I need to validate that It’s a user logged in am using clerk for authentication should I always use the identity? Ctx.auth.getUserIdentity but since I have a table in the dB storing every user Info I still don’t understand the process very well cause u would like to use the Id from the table not the one from clerk
Any tips would be considered helpful thank you
3 Replies
That auth function gives you info from clerk, and you can associate it with the user by tokenIdentifier or another. Check out docs.convex.dev under authentication
https://stack.convex.dev/wrappers-as-middleware-authentication as a pattern for https://docs.convex.dev/auth/functions-auth
and https://docs.convex.dev/auth/database-auth
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...
Auth in Functions | Convex Developer Hub
Within a Convex function, you can access information
Storing Users in the Convex Database | Convex Developer Hub
You might want to have a centralized place that stores information about the
@ian you have always been very helpfull from day one i really apprecite you