mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
disable 2fa on demo
This commit is contained in:
@ -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);
|
||||||
|
Reference in New Issue
Block a user