我已经实现了社交网站登录我的laravel 5.6应用程序,并从谷歌和Facebook获得重复的回调。 Twitter可以通过一个回调请求正常工作。
重定向和回调函数是标准函数,如文档中的示例。
重定向功能:
public function redirectToGoogle() {
return Socialite::driver('google')->redirect();
}
回调功能:
public function callbackFromGoogle() {
$user = Socialite::driver('google')->user();
$this->handleCallback($user );
}
日志文件:
xx.xx.xx.xx - - [21/Mar/2018:19:57:49 +0100] "GET /login/facebook HTTP/1.0" 302 2649 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36"
xx.xx.xx.xx - - [21/Mar/2018:19:57:50 +0100] "GET /login/facebook/callback?code=... HTTP/1.0" 200 1096 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36 "
xx.xx.xx.xx - - [21/Mar/2018:19:57:50 +0100] "GET /login/facebook/callback?code=... HTTP/1.0" 200 1100 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36 "
针对此问题的任何解决方案?