Only create account
Hello!
The application I support has been using auth0 for authentication only since its inception. We already have a users table in our database. We only get the email and if it's been verified from auth0. We're migrating to betterauth and plan to use betterauth the same way to make migration easier. Here's the main scenario we need working to successfully migrate:
Given a user has logged into the application using auth0 (username/pass or social sign in - doesn't matter). (This also means they already have a user record in our database)
When they go to our new sign in page, backed by better auth, they enter their email address
And we find their user record
Then we prompt the user to enter a new password so they can authenticate with better auth
I created a custom api route to handle sign up. In this scenario we find the user record and then I now want to create an account for them, basically hand off the sign up process to better auth using the better auth api manually, but I always get an error saying the user already exists. Which is true, but they still need an account created. I couldn't find a betterauth api function that allows you to create an account for an existing user.
Any help?
Also, are there api docs somewhere that describe all the available api calls?
Thank you!
0 Replies