Download the PHP package waqar/otploginauthentication without Composer
On this page you can find all versions of the php package waqar/otploginauthentication. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download waqar/otploginauthentication
More information about waqar/otploginauthentication
Files in waqar/otploginauthentication
Package otploginauthentication
Short Description A simple modified otp authentication
License MIT
Informations about the package otploginauthentication
Laravel Login Otp Authentication
Two-factor authentication (2FA) adds an extra layer of security to your application by requiring users to provide a second factor of authentication, usually a code generated by an authentication app or sent via SMS. OTP stands for "one-time password", which means that the code is only valid for a short period of time and cannot be reused.
Installation
Here is the complete video of the usage and installation of the package.
Step 1: Install Laravel
This is optional; however, if you have not created the laravel app, then you may go ahead and execute the below command:
Step 2: Setup Database Configuration
After successfully installing the laravel app then after configuring the database setup. We will open the ".env" file and change the database name, username and password in the env file.
Step 3: Install Auth Scaffold
Laravel's laravel/ui package provides a quick way to scaffold all of the routes and views you need for authentication using a few simple commands:
Next, we need to generate auth scaffold with bootstrap, so let's run the below command:
Then, install npm packages using the below command
At last, built bootstrap CSS using the below command:
Package Installation
Run Command
Now, run migration with following command:
Now, run migration with following command:
Step 4: Update Register Controller.
Update the below functions in the register controller.
Step 5: Configure sender mail address in laravel .env file
.env file:
Step 6: Create Twilio Account
First you need to create and add phone number. then you can easily get account SID, Token and Number.
Create Account from here: www.twilio.com.
Next add Twilio Phone Number
Next you can get account SID, Token and Number and add these in the .env file like bellow:
.env
All the required steps have been done, now you have to type the given below command and hit enter to run the Laravel app:
Now, Go to your web browser, type the given URL and view the app output: