SocialiteProviders / Providers

A Collection of Providers for Laravel Socialite
https://socialiteproviders.com
MIT License
507 stars 447 forks source link

Driver [Etsy] not supported. #282

Closed h2u closed 5 years ago

h2u commented 5 years ago

Tried etsy, Etsy, ETSY - nothing works.

Composer.json

"php": "^7.1.3",
"laravel/socialite": "^4.1",
"socialiteproviders/etsy": "^3.0",
"socialiteproviders/facebook": "dev-master",
"socialiteproviders/google": "^3.0",

config/services.php

'etsy' => [
    'client_id' => env('ETSY_KEY'),
    'client_secret' => env('ETSY_SECRET'),
    'redirect' => env('ETSY_REDIRECT_URI')
],

config/app.php

'providers' => [
    \SocialiteProviders\Manager\ServiceProvider::class,
]

App/Providers/EventServiceProvider.php

protected $listen = [
    SocialiteProviders\Manager\SocialiteWasCalled::class => [
        'SocialiteProviders\\Etsy\\EtsyExtendSocialite@handle',
        'SocialiteProviders\\Facebook\\FacebookExtendSocialite@handle',
        'SocialiteProviders\\Google\\GoogleExtendSocialite@handle',
    ]
];

Controller

return Socialite::driver($provider)->redirect();

h2u commented 5 years ago

Ok, just found a problem. App/Providers/EventServiceProvider.php, had to add (backslash) \ to SocialiteProviders\Manager\SocialiteWasCalled::class.

protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        'SocialiteProviders\\Etsy\\EtsyExtendSocialite@handle',
        'SocialiteProviders\\Facebook\\FacebookExtendSocialite@handle',
        'SocialiteProviders\\Google\\GoogleExtendSocialite@handle',
    ]
];