我正在尝试使用Laravel 5.1中的社交网站登录.我已经安装了社交网站并遵循以下教程:
https://mattstauffer.co/blog/using-github-authentication-for-login-with-laravel-socialite
http://tutsnare.com/social-authentication-in-laravel-5/
我已经按照每一步,当尝试使用Github登录时,它重定向到Github并在登录后重定向到URL回调,但我的问题是它不会将用户数据存储在我的数据库中.
更新1
现在我的问题是如何使用社交网络验证用户.以下是我的代码,但它会抛出一个错误,说明未定义的索引密码.该错误因为Auth::attempt()有passsword参数.
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
}
Run Code Online (Sandbox Code Playgroud)
更新2
经过一些研究,我意识到我需要创建自定义身份验证驱动程序.如果有任何想法请发表您的答案
一年前提出同样的问题