SocialiteProviders / Manager

Easily add new or override built-in Laravel Socialite providers
https://socialiteproviders.com/contribute/
MIT License
393 stars 84 forks source link

tag v3.3.5 error: GuzzleHttp Client must be of the type array, null given #143

Closed sinkcup closed 5 years ago

sinkcup commented 5 years ago

Issue / Motivation:

oauth login failed

Expected behavior:

get user from oauth server

Actual behavior:

error:

Argument 1 passed to GuzzleHttp\Client::__construct() must be of the type array, null given, called in laravel-demo/vendor/laravel/socialite/src/Two/AbstractProvider.php on line 356

Steps to reproduce the behavior:

composer require socialiteproviders/manager:^3.3.5

https://laravel.com/docs/5.8/socialite#routing

    public function handleProviderCallback()
    {
        $user = Socialite::driver('github')->user();

        // $user->token;
    }
Route::get('login/github/callback', 'Auth\LoginController@handleProviderCallback');

Proposed solution:

revert https://github.com/SocialiteProviders/Manager/pull/138/commits/42bdc6e3555bbaf9bb1c1663766c7631ae30f1a7

sinkcup commented 5 years ago

this problem come from #138 @r-takky can you submit tests?

rvanbaalen commented 5 years ago

This boggled my mind for the past two days. Can confirm that my implementation now works again when I updated to v3.3.6 from v3.3.5

sinkcup commented 5 years ago

@rvanbaalen what's the error message? you can try to lock on v3.3.4

rvanbaalen commented 5 years ago

@sinkcup I think you misunderstood me. I was just informing that the v3.3.6 (aka this emergency repair release) actually fixed this issue since I was experiencing it as well.

So, the error message I was experiencing is exactly the same as the title and it occured when I used the 37signals (Basecamp) provider which uses OAuth2 authentication.

sinkcup commented 5 years ago

@rvanbaalen thanks for your feedback. Through this accident, I realized the importance of testing and composer.lock.