You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
i've developed a mobile application making use of the laravue backend and API, but it happens that when I log-in in the app and make any other requests with the retrieved token, the api returns ['error' => 'Unauthorized'] with status 200.
i'm not sure of what is happening and what I'm missing here but the error is thrown from middleware/authenticate.php:
public function handle($request, Closure $next, ...$guards)
{
if ($this->authenticate($request, $guards) === 'authentication_error') {
return response()->json(['error' => 'Unauthorized']);
}
return $next($request);
}
protected function authenticate($request, array $guards)
{
if (empty($guards)) {
$guards = [null];
}
foreach ($guards as $guard) {
if ($this->auth->guard($guard)->check()) {
return $this->auth->shouldUse($guard);
}
}
return 'authentication_error';
}
After the login at the mobile app, all requests from the normal laravue web app or even from postman are responded with this same error.
Regards
The text was updated successfully, but these errors were encountered:
Hello,
i've developed a mobile application making use of the laravue backend and API, but it happens that when I log-in in the app and make any other requests with the retrieved token, the api returns ['error' => 'Unauthorized'] with status 200.
i'm not sure of what is happening and what I'm missing here but the error is thrown from middleware/authenticate.php:
After the login at the mobile app, all requests from the normal laravue web app or even from postman are responded with this same error.
Regards
The text was updated successfully, but these errors were encountered: