mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Some scrutiniser related code cleanup.
This commit is contained in:
@@ -52,10 +52,10 @@ class AuthenticateTwoFactor
|
||||
return redirect()->guest('login');
|
||||
}
|
||||
}
|
||||
$twoFactorAuthEnabled = Preferences::get('twoFactorAuthEnabled', false)->data;
|
||||
$hasTwoFactorAuthSecret = !is_null(Preferences::get('twoFactorAuthSecret'));
|
||||
$isTwoFactorAuthenticated = Session::get('twofactor-authenticated');
|
||||
if ($twoFactorAuthEnabled && $hasTwoFactorAuthSecret && !$isTwoFactorAuthenticated) {
|
||||
$is2faEnabled = Preferences::get('twoFactorAuthEnabled', false)->data;
|
||||
$has2faSecret = !is_null(Preferences::get('twoFactorAuthSecret'));
|
||||
$is2faAuthed = Session::get('twofactor-authenticated');
|
||||
if ($is2faEnabled && $has2faSecret && !$is2faAuthed) {
|
||||
return redirect(route('two-factor'));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user