mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update Two factor middleware to allow 3 attempts
This commit is contained in:
parent
2c16db187b
commit
d3eaccf706
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ class TwoFactorAuth
|
||||||
if($request->session()->has('2fa.session.active') !== true && !$request->is($checkpoint))
|
if($request->session()->has('2fa.session.active') !== true && !$request->is($checkpoint))
|
||||||
{
|
{
|
||||||
return redirect('/i/auth/checkpoint');
|
return redirect('/i/auth/checkpoint');
|
||||||
} elseif($request->session()->has('2fa.attempts') || (int) $request->session()->get('2fa.attempts') > 3) {
|
} elseif($request->session()->has('2fa.attempts') && (int) $request->session()->get('2fa.attempts') > 3) {
|
||||||
$request->session()->pull('2fa.attempts');
|
$request->session()->pull('2fa.attempts');
|
||||||
Auth::logout();
|
Auth::logout();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue