EtsyV3 OAuth2 Provider for Laravel Socialite
socialiteproviders/etsy is a Laravel package for etsyv3 oauth2 provider for laravel socialite.
It currently has 2 GitHub stars and 85.190 downloads on Packagist (latest version 5.1.0).
Install it with composer require socialiteproviders/etsy.
Discover more Laravel packages by socialiteproviders
or browse all Laravel packages to compare alternatives.
Last updated
Support for OpenAPI v3 on Etsy.
Note: V2 is scheduled to sunset Q4 2022.
composer require socialiteproviders/etsy
config/services.php'etsy' => [
'client_id' => env('ETSY_CLIENT_ID'),
'client_secret' => env('ETSY_CLIENT_SECRET'),
'redirect' => env('ETSY_REDIRECT_URI')
],
.envYou can find/update this information from https://www.etsy.com/developers/your-apps
ETSY_CLIENT_ID={YOUR API KEY}
ETSY_CLIENT_SECRET={YOUR SECRET}
ETSY_REDIRECT_URI=https://example.com/callback
In Laravel 11, the default EventServiceProvider provider was removed. Instead, add the listener using the listen method on the Event facade, in your AppServiceProvider boot method.
Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
$event->extendSocialite('etsy', \SocialiteProviders\Etsy\Provider::class);
});
Configure the package's listener to listen for SocialiteWasCalled events.
Add the event to your listen[] array in app/Providers/EventServiceProvider. See the Base Installation Guide for detailed instructions.
protected $listen = [
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
// ... other providers
\SocialiteProviders\Etsy\EtsyExtendSocialite::class.'@handle',
],
];
web/routes.phpYou should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed).
Note: The email_r is enabled by default so you can access user information in the callback.
// the redirect
return Socialite::driver('etsy')
->scopes[['include', 'scopes', 'here']]
->redirect();
// the callback
$etsyUser = Socialite::driver('etsy')
->user();
idnicknamenameemailavatar