OTP, or One-Time Password, SMS is a short message containing a one-time auto-generated password that is sent to the registered mobile phone number of the user who has initiated the request. This technology is perhaps the most popular mechanism used by companies around the world to make sure that the login request has been generated by an authorized person.
In this tutorial we will learn how to implement firebase phone authentication on laravel application.
First login to Firebase console using your Gmail account and create a new project.
Enter the project name. Let's type the name as LaravelOTP
Accept terms and conditions and create the project. Now by default Firebase will create a brand new project for us in Spark Plan where we can send 10K OTP every month for free. Check other Firebase plan as per your requirement. Click the Web icon to add Firebase to your app.
Give the App Nickname. I am using same name. You can use any name you like.
Here is the screenshot with Firebase configuration value. To communicate with Firebase our Laravel Application requires some of the values. So keep this handy. By login again to Firebase, you can access this values when requires.
Now move to Firebase Console, click Develop and select Authentication, Sign-in Method.
Enable Phone and save
We have successfully configured Firebase Phone Sign-in method for our Laravel Application. Let's move on to Part-2 of this tutorial.
0 comments:
Post a Comment