codepotatoltd / socialite-driver
Codepotato OAuth2 Provider for Laravel Socialite
dev-master
2016-08-26 15:42 UTC
Requires
- php: ^5.6||^7.0
- socialiteproviders/manager: ^2.1
Requires (Dev)
- mockery/mockery: ^0.9.5
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2024-11-16 00:41:25 UTC
README
This package provides oAuth support for Codepotato using laravel/socialite
Contents
Installation
Require the package using composer
composer require codepotatoltd/socialite-driver
This package utilises the Socialite Providers community project. We must remove the default laravel/socialite
service provider and use theirs in place.
'providers' => [ ... SocialiteProviders\Manager\ServiceProvider::class, ... ]
Next we need to register the socialite providers we wish to use by adding the event to your EventServiceProvider
.
protected $listen = [ \SocialiteProviders\Manager\SocialiteWasCalled::class => [ 'Codepotato\Socialite\CodepotatoExtendSocialite@handle', ], ];
Finally we just need to add our oAuth keys to config/services.php
'codepotato' => [ 'key' => env('CODEPOTATO_CLIENT_KEY'), 'secret' => env('CODEPOTATO_CLIENT_SECRET'), 'redirect' => env('CODEPOTATO_REDIRECT_URI'), ],
Testing
$ composer test
Credits
License
The MIT License (MIT). Please see License File for more information.