1.0.2.x-dev
1.0.2.9999999-dev
MIT
The Requires
by Doojin So
dev-master
9999999-dev
MIT
The Requires
by Doojin So
1.0.1.x-dev
1.0.1.9999999-dev
MIT
The Requires
by Doojin So
1.0.0.x-dev
1.0.0.9999999-dev
MIT
The Requires
by Doojin So
Wallogit.com
2017 © Pedro Peláez
composer require visualplus/social-login
Remove Laravel\Socialite\SocialiteServiceProvider from your providers[] array in config\app.php if you have added it already. Add SocialiteProviders\Manager\ServiceProvider to your providers[] array in config\app.php., (*1)
'providers' => [
// a whole bunch of providers
// remove 'Laravel\Socialite\SocialiteServiceProvider',
'SocialiteProviders\Manager\ServiceProvider', // add
];
Add SocialiteProviders\Manager\SocialiteWasCalled event to your listen[] array in
protected $listen = [
'SocialiteProviders\Manager\SocialiteWasCalled' => [
'Visualplus\SocialLogin\SocialLoginExtendSocialite',
],
];
'aliases' => [
...
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
...
];
return [
'naverid' => [
'client_id' => 'your client id key',
'client_secret' => 'your client secret',
'redirect' => 'your redirect url',
],
'kakaoid' => [
'client_id' => 'your client id key',
'client_secret' => '', // kakaoid doesn't have client secret. just leave a blank.
'redirect' => 'your redirect url',
],
];
to get Naver ID keys. see this page https://nid.naver.com/devcenter/main.nhn to get Kakao ID keys. see this page https://developers.kakao.com/docs/restapi, (*3)
For naverid., (*4)
Route::get('naverid', function() {
return Socialite::with('naverid')->redirect();
});
Route::get('your redirect url', function() {
dd(Socialite::with('naverid')->user());
});
For kakaoid., (*5)
Route::get('kakaoid', function() {
return Socialite::with('kakaoid')->redirect();
});
Route::get('your redirect url', function() {
dd(Socialite::with('kakaoid')->user());
});
if authentication was failed, error will be occured at getting user code ( Socialite::with('')->user() ). you could know throught return page's parameters. ( e.g. http://your redirect url?error=some reason&extra1=extra1... ), (*6)
MIT
MIT
MIT
MIT