Skip to content

Commit

Permalink
Improve and fix issues with 2FA
Browse files Browse the repository at this point in the history
  • Loading branch information
fguillot committed Apr 3, 2015
1 parent c72bca0 commit e5f6e36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/Auth/RememberMe.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ public function authenticate()
// Create the session
$this->userSession->refresh($this->user->getById($record['user_id']));

// Do not ask 2FA for remember me session
$this->session['2fa_validated'] = true;

$this->container['dispatcher']->dispatch(
'auth.success',
new AuthEvent(self::AUTH_NAME, $this->userSession->getId())
Expand Down
2 changes: 1 addition & 1 deletion app/Controller/Twofactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function save()
}

// Allow the user to test or disable the feature
$this->session['user']['twofactor_activated'] = false;
$_SESSION['user']['twofactor_activated'] = false;

$this->session->flash(t('User updated successfully.'));
$this->response->redirect($this->helper->url('twofactor', 'index', array('user_id' => $user['id'])));
Expand Down

0 comments on commit e5f6e36

Please sign in to comment.