Galactus
Galactus4w ago

convex auth - multiple auth account for one user

I'm working on authentication for my new app using convex-auth. We'd like for our users to be able to: 1. sign up with phone number (I followed the twilio OTP example from the example repo) 2. Update the user object to have an email, name, and password. 3. Use email and password for signing in later. I'm struggling to see the best path forward given the examples. Does it make sense to have multiple authAccounts all tied to the same user? How can I get the ResendOTP flow to connect to the same user I've created? Thanks for the help!
4 Replies
Convex Bot
Convex Bot4w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
Galactus
GalactusOP4w ago
I've got the twilio OTP and resend OTP working independently - but pretty much struggling to have the resend email verification tie to the same user I'm considering if there should be one authAccount - which has a password (stored in secret) - and is tied to the user which has the email / phone number. Does this sound like the right approach?
erquhart
erquhart4w ago
You should definitely have separate auth accounts for the two methods
erquhart
erquhart4w ago
Recommend reading throught the account linking doc: https://labs.convex.dev/auth/advanced#account-linking
Advanced: Details - Convex Auth
Authentication library for your Convex backend

Did you find this page helpful?