Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The resource owner or authorization server denied the request

Tags:

php

ios

laravel

api

I have an iPhone application which uses Laravel for its back-end, it must be published in app store, but app store rejected the app because they have the following error:

The resource owner or authorization server denied the request. {"exception":"[object] (League\OAuth2\Server\Exception\OAuthServerException(code: 9): The resource owner or authorization server denied the request. at /var/www/mednfit/vendor/league/oauth2-server/src/Exception/OAuthServerException.php:205)

But I don't have this error. What does this mean?

like image 219
Dmitry Kozachkov Avatar asked Apr 15 '19 09:04

Dmitry Kozachkov


1 Answers

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

like image 85
Nadjib Khelifati Avatar answered Sep 16 '22 16:09

Nadjib Khelifati