is this the best approach to store user in Convex database + Clerk
I found this in convex documentation, seeing useEffect feels a bit off to me
https://docs.convex.dev/auth/database-auth
My initial plan is to use clerk's webhook which i think a much cleaner solution to store user data.
What's the expert's thoughts on this ?
Storing Users in the Convex Database | Convex Developer Hub
You might want to have a centralized place that stores information about the
4 Replies
We have a template that outlines how to get user data via webhook: https://github.com/thomasballinger/convex-clerk-users-table
GitHub
GitHub - thomasballinger/convex-clerk-users-table
Contribute to thomasballinger/convex-clerk-users-table development by creating an account on GitHub.
@Indy im more interested to know which one is recommended rather that the actual implementation
@Michal Srb who's spent the most working on this can give you pros and cons. He's thinking through this more deeply
@ibrahimyaacob The webhook setup is more involved but more powerful, as you can sync information beyond what can fit in the JWT token, and you can receive updates even if the user made them outside of your app (say changing their name in their Google account).