feat: add two-factor authentication support and related configurations

This commit is contained in:
2026-07-24 12:59:10 +02:00
parent 54345e621c
commit 235d5f646c
27 changed files with 2608 additions and 374 deletions

View File

@@ -27,6 +27,8 @@ return [
'password_reset' => env('AUTH_ENABLE_PASSWORD_RESET', true),
'remember_me' => env('AUTH_ENABLE_REMEMBER_ME', true),
'email_verification' => env('AUTH_ENABLE_EMAIL_VERIFICATION', false),
'two_factor' => env('AUTH_ENABLE_TWO_FACTOR', false),
'two_factor_required' => env('AUTH_REQUIRE_TWO_FACTOR', false),
],
/*

17
config/fortify.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
use Laravel\Fortify\Features;
return [
'guard' => 'web',
'username' => 'email',
'views' => false,
'home' => config('auth-ui.redirects.login', '/dashboard'),
'features' => config('auth-ui.features.two_factor')
? [
Features::twoFactorAuthentication([
'confirm' => true,
]),
]
: [],
];