Skip to content

Commit

Permalink
Fix two factor login check (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Mar 8, 2021
1 parent 67d7743 commit 0762191
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Http/Requests/TwoFactorLoginRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,10 @@ public function validRecoveryCode()
*/
public function hasChallengedUser()
{
try {
$user = $this->challengedUser();
} catch (HttpResponseException $e) {
return false;
}
$model = app(StatefulGuard::class)->getProvider()->getModel();

return $user !== null;
return $this->session()->has('login.id') &&
$model::find($this->session()->get('login.id'));
}

/**
Expand Down

0 comments on commit 0762191

Please sign in to comment.