I am trying to login using social sites in Laravel 5.1. I have installed socialite and following below tutorial:
https://mattstauffer.co/blog/using-github-authentication-for-login-with-laravel-socialite
http://tutsnare.com/social-authentication-in-laravel-5/
I have followed every step, when try to login using Github, it redirect to Github and after login it redirect to URL callback, but my problem is it won't store user data in my database.
Update-1
Now my problem is how to authenticate user using social network. Following is my code but it throw an error saying undefined index password. That error because Auth::attempt() has passsword parameter.
if (Auth::attempt(['email' => $email, 'user_id' => $user_id])) {
return redirect()->intended('user/UserDashboard');
} else {
here i am going to insert if user not logged in already
}
Update-2
After some research i realized that i need to create Custom Authentication Drivers. If any one have idea please post your answers
same question asked one year ago
