ibrahimyaacob
ibrahimyaacob11mo ago

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
Indy
Indy11mo ago
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.
ibrahimyaacob
ibrahimyaacobOP11mo ago
@Indy im more interested to know which one is recommended rather that the actual implementation
Indy
Indy11mo ago
@Michal Srb who's spent the most working on this can give you pros and cons. He's thinking through this more deeply
Michal Srb
Michal Srb11mo ago
@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).

Did you find this page helpful?