disable 2fa on demo

This commit is contained in:
Saeed Vaziry
2025-06-27 08:39:18 +02:00
parent 194143d7ef
commit f532b56abb

View File

@ -72,6 +72,10 @@ public function password(Request $request): RedirectResponse
#[Post('/enable-two-factor', name: 'profile.enable-two-factor')] #[Post('/enable-two-factor', name: 'profile.enable-two-factor')]
public function enableTwoFactor(): RedirectResponse public function enableTwoFactor(): RedirectResponse
{ {
if (config('app.demo')) {
return back()->with('error', 'Two factor authentication cannot be enabled in demo mode.');
}
$user = user(); $user = user();
app(EnableTwoFactorAuthentication::class)($user); app(EnableTwoFactorAuthentication::class)($user);