Reputation: 121
As firebase charges for phone verification after the free limits, i want to have a functionality in my application where the user registers through phone auth and then after that whenever login use email for the login. Please tell me how can I achieve this functionality. Thanks.
Upvotes: 0
Views: 59
Reputation: 7388
First of all you would need to ask your user to provide you his email. You could do that after the phone registration.
After that you can use the firebase cloud functions to create a user with that email and notify him to that email that a user was created for him.
For the password you could ask him to enter on or generate a random and secure one and send it within the email notification. You could also create the user with a random password and after the creation send a "password reset" email where the user can set his password.
All that depend on the use case. The mian point is that you would need to do it on you own. There is no build in functionality for that in Firebase but a lot of other that can help you to get to your solition.
Upvotes: 1