Is it possible to set a password for a user created with a phone number?

I'd like to create an account with a phone number but also set a password afterward. I've seen that it's possible to sign in with phone & password, but I don't know how the password should be defined in the first place. Any ideas?
Solution:
resetPassword would trigger another SMS. Instead, I'll try to use: https://www.better-auth.com/docs/concepts/users-accounts#change-password https://www.better-auth.com/docs/concepts/users-accounts#set-password Let me know if it's a dead end....
User & Accounts | Better Auth
User and account management.
Jump to solution
2 Replies
FalconiZzare
FalconiZzare2mo ago
First you create an account using phone number using Phone Number plugin (enter phone number -> enter OTP -> session is created) Then you can use the resetPassword to set a password for the user. The phone number works as an identifier. https://www.better-auth.com/docs/plugins/phone-number#request-password-reset After that maybe you can set an email for the user too if you need to and verify the email. Then you will have an email based account too which then can be linked to oauth and etc.
Phone Number | Better Auth
Phone number plugin
Solution
Quentin
Quentin2mo ago
resetPassword would trigger another SMS. Instead, I'll try to use: https://www.better-auth.com/docs/concepts/users-accounts#change-password https://www.better-auth.com/docs/concepts/users-accounts#set-password Let me know if it's a dead end.
User & Accounts | Better Auth
User and account management.

Did you find this page helpful?