How to manually create an authAccount to go with a user in Convex Auth?
I need to create
user
rows and then later let humans claim those user (profiles) and create a proper authAccount
row to go with them. I've created a table of invitations
, which include hashed tokens, and mutation to create an invite and email the human in question. I'm now stuck on the human claiming the user (profile). I suspect adding a new ConvexCredentials
provider might be a solution which uses the token to sign the user in, but the documentation for ConvexCredentials
is sparse and I can't really figure out where to start. On the other hand, I could manually add a row to the authAccount
table but this seems hacky. How should "claiming" an auth-less-user-profile work?1 Reply
If you implement
createOrUpdateUser()
you can control user and account creation, so you could find the existing user in the process. I don't know if you'll hit any other snags due to creating a user manually in advance, but should be fine.