Code for 2fa

This commit is contained in:
James Cole
2017-11-22 20:20:57 +01:00
parent 0faa599b4c
commit 3cb3c7f60f
5 changed files with 76 additions and 10 deletions

View File

@@ -65,7 +65,7 @@ class AuthenticateTwoFactor
$has2faSecret = null !== Preferences::get('twoFactorAuthSecret');
// grab 2auth information from session.
$is2faAuthed = true === $request->session()->get('twoFactorAuthenticated');
$is2faAuthed = 'true' === $request->cookie('twoFactorAuthenticated');
if ($is2faEnabled && $has2faSecret && !$is2faAuthed) {
Log::debug('Does not seem to be 2 factor authed, redirect.');