diff --git a/app/Http/Middleware/ApiAuthenticate.php b/app/Http/Middleware/ApiAuthenticate.php index 236cc97c..0a0f2f8d 100644 --- a/app/Http/Middleware/ApiAuthenticate.php +++ b/app/Http/Middleware/ApiAuthenticate.php @@ -58,6 +58,8 @@ class ApiAuthenticate 'status_code' => 401, ], 401); } + } elseif ($user = $request->getUser()) { + $this->auth->onceBasic(); } else { return response()->json([ 'message' => 'You are not authorized to view this content.',