facebook authentication using laravel 5.1 socialite

▼魔方 西西 提交于 2019-12-25 04:07:39

问题


hello im using localhost so i have recently switched to laravel 5.1 and im trying to use 'socialite' it provides so i have updated my config , services and the .env files so in my routes i also added these codes

Route::get('/', function () {
return view('welcome');
 });
 Route::get('auth/facebook', 'Auth\AuthController@redirectToProvider');
 Route::get('auth/facebook/callback','Auth\AuthController@handleProviderCallback');
Route::get('home', array('as' => 'home', 'uses' => function(){
return view('home');
}));

then in my AuthController i have these codes

in my view the button 'login with facebook' has the href of auth/facebook but what happens is facebook is giving me an error saying

note: i also made my facebook app live in the facebook developers i also added this on my domain but also have a warning

im still confused on where my error is. any idea what im doing wrong? thanks for advices.


回答1:


Have you checked your site url value into Site URL field. Update it and check.

This should be work for you.



来源:https://stackoverflow.com/questions/40711934/facebook-authentication-using-laravel-5-1-socialite

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!