mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Merge pull request #2348 from dx7/2FA-page-issues
2FA verification page issues
This commit is contained in:
commit
8ffad2b615
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ class TwoFactorAuth
|
|||
$enabled = (bool) $user->{'2fa_enabled'};
|
||||
if($enabled != false) {
|
||||
$checkpoint = 'i/auth/checkpoint';
|
||||
if($request->session()->has('2fa.session.active') !== true && !$request->is($checkpoint))
|
||||
if($request->session()->has('2fa.session.active') !== true && !$request->is($checkpoint) && !$request->is('logout'))
|
||||
{
|
||||
return redirect('/i/auth/checkpoint');
|
||||
} elseif($request->session()->has('2fa.attempts') && (int) $request->session()->get('2fa.attempts') > 3) {
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between pt-4 small">
|
||||
<a class="text-lighter text-decoration-none" href="/{{Auth::user()->username}}">Logged in as: <span class="font-weight-bold text-muted">{{Auth::user()->username}}</span></a>
|
||||
<span class="text-lighter text-decoration-none">Logged in as: <span class="font-weight-bold text-muted">{{Auth::user()->username}}</span></span>
|
||||
<span>
|
||||
<a class="text-decoration-none text-muted font-weight-bold" href="{{ route('logout') }}" onclick="event.preventDefault();document.getElementById('logout-form').submit();">Logout</a>
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
||||
|
|
Loading…
Reference in a new issue