#How to get other user's clerk data?
2 messages · Page 1 of 1 (latest)
I have implemented this in a couple of apps. It is not straightforward, requires some hacks which all of them has some disadvantages.
- Use clerk webhook to sync clerk users to your Convex DB. There is a qood post out there on Convex.
- Use that table to fetch other users
- 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.
- 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.