diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 743eb9b283..2648d557a6 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -121,6 +121,8 @@ class Authenticate Log::debug('Guard array is not empty.'); foreach ($guards as $guard) { + Log::debug(sprintf('Now in guard loop, guard is "%s"', $guard)); + $this->auth->guard($guard)->authenticate(); if ($this->auth->guard($guard)->check()) { // According to PHPstan the method returns void, but we'll see. return $this->auth->shouldUse($guard); // @phpstan-ignore-line diff --git a/app/Support/Authentication/RemoteUserGuard.php b/app/Support/Authentication/RemoteUserGuard.php index 636bb0d6dd..b22453f967 100644 --- a/app/Support/Authentication/RemoteUserGuard.php +++ b/app/Support/Authentication/RemoteUserGuard.php @@ -118,7 +118,6 @@ class RemoteUserGuard implements Guard public function guest(): bool { Log::debug(sprintf('Now at %s', __METHOD__)); - $this->authenticate(); return !$this->check(); } @@ -128,7 +127,6 @@ class RemoteUserGuard implements Guard public function check(): bool { Log::debug(sprintf('Now at %s', __METHOD__)); - $this->authenticate(); return !is_null($this->user()); } @@ -138,7 +136,7 @@ class RemoteUserGuard implements Guard public function user(): ?User { Log::debug(sprintf('Now at %s', __METHOD__)); - $this->authenticate(); + //$this->authenticate(); return $this->user; }