Skip to content

Commit 0762191

Browse files
authored
Fix two factor login check (#235)
1 parent 67d7743 commit 0762191

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Http/Requests/TwoFactorLoginRequest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,10 @@ public function validRecoveryCode()
8282
*/
8383
public function hasChallengedUser()
8484
{
85-
try {
86-
$user = $this->challengedUser();
87-
} catch (HttpResponseException $e) {
88-
return false;
89-
}
85+
$model = app(StatefulGuard::class)->getProvider()->getModel();
9086

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

9491
/**

0 commit comments

Comments
 (0)