Skip to content

This project demonstrates a two-factor authentication system implemented in Laravel. When a user registers, they receive an OTP via email. After entering the OTP, they complete the registration process. Mailtrap is used for OTP notifications.

Notifications You must be signed in to change notification settings

Majid-Razzaq/Two-Factor-Authentication-Laravel

Repository files navigation

Laravel Logo

Build Status Total Downloads Latest Stable Version License

Requirements

  • Laravel 11
  • PHP 8.1
  • Composer 2.x

Getting Started

  • Clone the repository.
  • Run composer install to install dependencies.
  • Change the .env.example to .env and add your database info
  • Set up your database configuration in the .env file.
  • Run php artisan migrate to set up the necessary tables.
  • Install the required package for Google2FA.
  • Publish the package configuration.
  • Implement and customize as needed.
composer install
php artisan migrate
composer require pragmarx/google2fa-laravel
php artisan vendor:publish --provider="PragmaRX\Google2FALaravel\ServiceProvider"
npm install
npm run dev
php artisan serve

About

This project demonstrates a two-factor authentication system implemented in Laravel. When a user registers, they receive an OTP via email. After entering the OTP, they complete the registration process. Mailtrap is used for OTP notifications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages