Web Dev CodyW
Convex Community2y ago
18 replies
Web Dev Cody

Convex + Clerk, what userId should I be storing

Currently in my system I've been storing the clerk userId on all my table models as a string. I find this to cause a little friction because I don't have access to the v.id("users") all throughout my system by default, but the issue is my getUserIdentity() is the convex id, so if I wanted to lookup the real user._id in my system I'd end up having to do an extra query in all of my auth checks basically.

Is there a recommended approach for what I'm doing? I'm starting to think storing clerk user id (external third party auth service) on all my tables wasn't the best move
Was this page helpful?