voval921 / socialiteproviders-epicgames
Epic Games OAuth2 Provider for Laravel Socialite
1.0.2
2023-01-16 20:00 UTC
Requires
- php: ^5.6 || ^7.0
- ext-json: *
- socialiteproviders/manager: ~3.5
This package is auto-updated.
Last update: 2024-10-17 00:22:51 UTC
README
composer require voval921/socialiteproviders-epicgames
Add configuration to config/services.php
'epicgames' => [ 'client_id' => null, 'client_secret' => env('EPICGAMES_CLIENT_SECRET'), 'redirect' => env('EPICGAMES_REDIRECT_URI'), 'allowed_hosts' => [ 'example.com', ] ],
Add provider event listener
Configure the package's listener to listen for SocialiteWasCalled
events.
Add the event to your listen[]
array in app/Providers/EventServiceProvider
.
protected $listen = [ \SocialiteProviders\Manager\SocialiteWasCalled::class => [ // ... other providers \Voval\Socialite\EpicGames\EpicGamesExtendSocialite::class.'@handle', ], ];
Usage
You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):
return Socialite::driver('epicgames')->redirect();