mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix for #1002
This commit is contained in:
@@ -64,8 +64,8 @@ class AuthenticateTwoFactor
|
||||
$is2faEnabled = Preferences::get('twoFactorAuthEnabled', false)->data;
|
||||
$has2faSecret = null !== Preferences::get('twoFactorAuthSecret');
|
||||
|
||||
// grab 2auth information from cookie, not from session.
|
||||
$is2faAuthed = 'true' === Cookie::get('twoFactorAuthenticated');
|
||||
// grab 2auth information from session.
|
||||
$is2faAuthed = true === $request->session()->get('twoFactorAuthenticated');
|
||||
|
||||
if ($is2faEnabled && $has2faSecret && !$is2faAuthed) {
|
||||
Log::debug('Does not seem to be 2 factor authed, redirect.');
|
||||
|
@@ -47,8 +47,8 @@ class RedirectIfTwoFactorAuthenticated
|
||||
$is2faEnabled = Preferences::get('twoFactorAuthEnabled', false)->data;
|
||||
$has2faSecret = null !== Preferences::get('twoFactorAuthSecret');
|
||||
|
||||
// grab 2auth information from cookie
|
||||
$is2faAuthed = 'true' === Cookie::get('twoFactorAuthenticated');
|
||||
// grab 2auth information from session.
|
||||
$is2faAuthed = true === $request->session()->get('twoFactorAuthenticated');
|
||||
|
||||
if ($is2faEnabled && $has2faSecret && $is2faAuthed) {
|
||||
return redirect('/');
|
||||
|
Reference in New Issue
Block a user