ibrahimyaacob
ibrahimyaacob6mo ago

How to get other user's clerk data?

i want to get user's profile url from clerk, am i expected to use @clerk/backend package and create an action function. that would be terrible.. whats the right way to do it?
2 Replies
giray
giray6mo ago
I have implemented this in a couple of apps. It is not straightforward, requires some hacks which all of them has some disadvantages. 1. Use clerk webhook to sync clerk users to your Convex DB. There is a qood post out there on Convex. 2. Use that table to fetch other users 3. You can disable a user to do an action prior to having user's information on the Convex. However, sometimes I do not do that. Instead I denormalize user data to my tables (I use userId amd username) to save to my tables and if the user changes its username, for example, in the webhook I also update the other tables that has denormalized username field. 4. In theory, you can always use an action to fetch clerk/backend to fetch the users but it is not scalable. So I do not suggest that.
Michal Srb
Michal Srb6mo ago
Storing Users in the Convex Database | Convex Developer Hub
You might want to store user information directly in your Convex database, for

Did you find this page helpful?