fbele
fbele•4mo ago

Is there a way to use Password + Phone providers for authentication?

I have successfully implemented the Phone provider in my app, but after successful verification of the phone number I would like that a user can define a password for signing in to the app. So it would be a combination of a phone number + password. I know that Password provider can work together with an Email provider (i.e. Resend), which essentially accomplishes what I want to achieve, but it's using an email instead of a phone a channel. Any solution in this regard would be acceptable, so that a user doesn't need to verify an OTP via phone number would be acceptable. Thanks.
1 Reply
fbele
fbeleOP•4mo ago
@sshader @Michal Srb perhaps you can kindly help me with that? Would I need a CustomCredentials provider to achieve this flow? To recap my flow: 1. A user enters his phone number which gets verified via OTP. 2. After that a user defines his password that is going to be coupled with his phone number (authAccounts.secret) 3. From now on the user can use his phone number + password to sign in into the app. Since Password provider currently cannot be used together with Phone provider (new Feature perhaps?), then I was thinking maybe I need to use CustomCredentials, but I have no idea how to create a signIn if the user provides the password. Can you please help me with that? Thank you. I have figured it out! Thank you anyways! 🙂