1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Started moving MFA and email confirmation to new login flow

Instead of being soley middleware based.
This commit is contained in:
Dan Brown
2021-07-17 18:24:50 +01:00
parent 9249addb5c
commit 1278fb4969
9 changed files with 84 additions and 118 deletions

View File

@ -7,17 +7,11 @@ use Illuminate\Http\Request;
class Authenticate
{
use ChecksForEmailConfirmation;
/**
* Handle an incoming request.
*/
public function handle(Request $request, Closure $next)
{
if ($this->awaitingEmailConfirmation()) {
return $this->emailConfirmationErrorResponse($request);
}
if (!hasAppAccess()) {
if ($request->ajax()) {
return response('Unauthorized.', 401);