From f8d9133c8a368dd1fe2620ef40710d59aad5f3b5 Mon Sep 17 00:00:00 2001 From: Naser Mansour Date: Sat, 17 Jan 2026 12:46:17 +0200 Subject: [PATCH] disabeled 2fa --- config/fortify.php | 8 ++++---- routes/web.php | 22 ++++++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/config/fortify.php b/config/fortify.php index d833dde..94d7751 100644 --- a/config/fortify.php +++ b/config/fortify.php @@ -149,10 +149,10 @@ return [ Features::emailVerification(), Features::updateProfileInformation(), Features::updatePasswords(), - Features::twoFactorAuthentication([ - 'confirm' => true, - 'confirmPassword' => true, - ]), + // Features::twoFactorAuthentication([ + // 'confirm' => true, + // 'confirmPassword' => true, + // ]), // DISABLED - client request ], ]; diff --git a/routes/web.php b/routes/web.php index 31a0ef4..df37439 100644 --- a/routes/web.php +++ b/routes/web.php @@ -162,14 +162,16 @@ Route::middleware(['auth', 'active'])->group(function () { Volt::route('settings/profile', 'settings.profile')->name('profile.edit'); Volt::route('settings/password', 'settings.password')->name('user-password.edit'); - Volt::route('settings/two-factor', 'settings.two-factor') - ->middleware( - when( - Features::canManageTwoFactorAuthentication() - && Features::optionEnabled(Features::twoFactorAuthentication(), 'confirmPassword'), - ['password.confirm'], - [], - ), - ) - ->name('two-factor.show'); + // 2FA settings route - only registered when feature is enabled + if (Features::canManageTwoFactorAuthentication()) { + Volt::route('settings/two-factor', 'settings.two-factor') + ->middleware( + when( + Features::optionEnabled(Features::twoFactorAuthentication(), 'confirmPassword'), + ['password.confirm'], + [], + ), + ) + ->name('two-factor.show'); + } });