The resource owner or authorization server denied the request The resource owner or authorization server denied the request laravel laravel

The resource owner or authorization server denied the request


This exception related to expired access token.

You can add \League\OAuth2\Server\Exception\OAuthServerException::class to your $dontReport array in app/Exceptions/Handler.php. This will, however, prevent logging of all OAuthServerException exceptions, even those not related to your expired access token.

Source: Laracasts: Error Log Problems When Using Laravel Passport for User Login AuthenticationError Log Problems When Using Laravel Passport for User Login Authentication


Same error message as you while logging in still ok. You can try this in composer.json

"laravel/passport": "9.0.0","lcobucci/jwt": "3.4.5","league/oauth2-server": "8.1.3",


juste run on prod

composer dump-autoloadphp artisan optimize:clear