Laravel Two Factor Authentication starter
This is a fresh laravel application with the default authentication modified to enforce two factor authentication.
You can simply clone, change the environment variables and run migrations to begin.
During registration, users will be forced to set up their Google Authenticator by scanning a barcode or typing the secret key.
Once logged in, if a user wants to change the secret, they can navigate to
As the admin if you want to change the user's secret yourself, run this command from the console.
php artisan 2fa:reauthenticate
It will prompt for the user's email and then ask for confirmation before generating and displaying the new keys.
You can pass the email directly using the
php artisan 2fa:reauthenticate --email@example.com --force