Merge pull request #2348 from dx7/2FA-page-issues

2FA verification page issues
pull/2354/head
daniel 2020-07-26 22:11:36 -06:00 zatwierdzone przez GitHub
commit 8ffad2b615
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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) {

Wyświetl plik

@ -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;">