Joseph_Ebuka
Joseph_Ebuka13mo ago

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
ian
ian13mo ago
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
ian
ian13mo ago
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
Joseph_Ebuka
Joseph_EbukaOP13mo ago
@ian you have always been very helpfull from day one i really apprecite you

Did you find this page helpful?