StoicWanderer
StoicWanderer14mo ago

How do i search users by id?

Hello fellow Convex users, I am extremely beginner with Convex and can't really wrap my head around the whole things' mechanics. I am using Clerk as authentication and I am saving the logged in user into my Convex database fro later. I know that Convex automatically generates an ID for the logged in user, but how do i read that id after the user logs in, so that i can retreive the usr data with queries from the batabase? Can anyone help out, please?
1 Reply
Michal Srb
Michal Srb14mo ago
Hey @StoicWanderer , this is covered here: https://docs.convex.dev/auth/database-auth#reading-from-users-table You can make yourself a helper that takes in ctx and tokenIdentifier and returns the user.
Storing Users in the Convex Database | Convex Developer Hub
You might want to have a centralized place that stores information about the

Did you find this page helpful?