Laravel Two-Factor Auth via Email
Simple demo-project to add two-factor authentication, with sending 6-digit unique verification code via email.
Every time user logs in, they will see this view, with ability to re-send the code:
At the same time, this email will be sent:
How to use
- Clone the repository with git clone
- Copy .env.example file to .env and edit database credentials there, also email provider settings (to send verification codes)
- Run composer install
- Run php artisan key:generate
- Run php artisan migrate --seed (it has some seeded data for your testing)
- That's it: launch the main URL.
- You can login to adminpanel with default credentials email@example.com - password
Basically, feel free to use and re-use any way you want.