Search code examples
angularfirebasegoogle-cloud-firestoregoogle-cloud-functionsangularfire2

Firebase Signin with phone verification and user profile creation with could functions


I'm creating a server side rendered Angular application and i'am using firebase for backend tasks.

I would like to know the best ways to achieve my authentication requirement that are as follow :

  • user enter his name, email, password..etc.
  • After hiting submit button a SMS must be sent to the user phone number with a 6 digits code.
  • the user enter the code provided by sms, his account is created and his is redirected to login page.

What is the best ways to create the user profile ? Cloud functions or client side ? how can i perfome SMS verification with Firebase ?


Solution

  • Cloud Functions is not what you want here, Firebase have this feature you're asking all ready in one of its core products.

    Firebase Authentication is the solution you're in need, specifically Phone Auth. Pretty straightforward, and you will delegate SMS APIs, security and kind-of heavy tasks that Firebase encapsulates for you. You can implement it with ease following this tutorial here.