This Laravel 11 application provides a robust registration and login system with OTP (One-Time Password) verification, enhancing security for user authentication. Leveraging the power of Laravel 11, PHP 8, and MySQL, this project ensures reliability, scalability, and performance for authentication needs.
-
Backend:
- Laravel 11
- PHP 8
- MySQL
-
Frontend:
- Bootstrap 5
- HTML 5
-
API Testing:
- Postman
- Secure Authentication: Utilizes OTP verification for both registration and login, enhancing security.
- Password Management: Includes functionality for password reset and change password.
- Modern UI: Utilizes Laravel UI for frontend components and Bootstrap 5 for a responsive and visually appealing interface.
- Scalable and Reliable: Built on Laravel 11 and PHP 8, ensuring scalability and reliability for your authentication needs.
Before you begin, ensure you have met the following requirements:
- PHP >= 8.1
- Composer
- MySQL
- Node.js & NPM
- Git
-
Clone the repository:
git clone https://github.com/shababsalehin/laravel-11-login-with-otp-verification.git cd laravel-11-login-with-otp-verification
-
Install dependencies:
composer install npm install npm run dev
-
Set up the environment file:
cp .env.example .env php artisan key:generate
-
Configure the database: Update the
.env
file with your database credentials:DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=otp_verification DB_USERNAME=root DB_PASSWORD=
-
Run migrations:
php artisan migrate
-
Start the application:
php artisan serve
-
Visit the application: Open your web browser and visit
http://127.0.0.1:8000/
.
- Go to the registration page.
- Fill in the registration form with your details.
- Submit the form to receive an OTP.
- Enter the OTP to complete the registration.
- Go to the login page.
- Login with Email and Password.
- Clicking forget password will redirects in a page where user's registered mobile number is needed to generate otp.
- Enter the OTP to log in.
- Log in to your account.
- Navigate to the "Change Password" section in the dashboard.
- Enter old password, then enter your current password and the new password.
API endpoints can be tested using Postman. Import the provided Postman collection and environment file for easy testing.
Feel free to contribute to this project. Pull requests are welcome.
If you have any questions or suggestions, feel free to reach out:
Email: auddhayashabab@gmail.com