Skip to content

League OAuth2 incompatibility #113

@gavinservai

Description

@gavinservai

I don't quite understand how this issue came about:
First I'll explain what works:
Using Dingo API version 0.5.0:
I use a POST request to get a client token. Then, immediately after, I pass an access token via GET parameter to a protected API. This works, and I get the appropriate resource.

However, using Dingo API version 0.6.2:
When I make the GET request, I receive an error:
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleError(2, 'call_user_func(...', '/vagrant/www/pl...', 101, Array)
#1 /vagrant/www/planat-app/vendor/dingo/api/src/Auth/LeagueOAuth2Provider.php(101): call_user_func(NULL, '2')
#2 /vagrant/www/planat-app/vendor/dingo/api/src/Auth/LeagueOAuth2Provider.php(84): Dingo\Api\Auth\LeagueOAuth2Provider->resolveResourceOwner()
#3 /vagrant/www/planat-app/vendor/dingo/api/src/Auth/Shield.php(98): Dingo\Api\Auth\LeagueOAuth2Provider->authenticate(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#4 /vagrant/www/planat-app/vendor/dingo/api/src/Http/Middleware/Authentication.php(127): Dingo\Api\Auth\Shield->authenticate(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#5 /vagrant/www/planat-app/vendor/dingo/api/src/Http/Middleware/Authentication.php(94): Dingo\Api\Http\Middleware\Authentication->authenticate(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#6 /vagrant/www/planat-app/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Dingo\Api\Http\Middleware\Authentication->handle(Object(Illuminate\Http\Request), 1, true)
#7 /vagrant/www/planat-app/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#8 /vagrant/www/planat-app/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#9 /vagrant/www/planat-app/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#10 /vagrant/www/planat-app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(606): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#11 /vagrant/www/planat-app/public/index.php(49): Illuminate\Foundation\Application->run()

I'm completely unsure as to why this is occurring.
This is the first Github issue I have ever opened, hopefully I'm doing it right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions