0

I have applied socialite package in my project following the Laravel Socialite Documentation https://laravel.com/docs/5.4/socialite

The problem arises when I try to login/register a user it throws this particular error enter image description here

I have already checked my URL's on facebook panel as well as on my side. The code is as follows:-

Route::get('customer/{provider}', ['as' => 'customer.social-login', 'uses' => 'CustomerController@redirectToProvider']);
Route::get('customer/{provider}/callback', ['uses' => 'CustomerController@handleProviderCallback']);

Controller

public function redirectToProvider($provider)
{
    return Socialite::driver($provider)
        ->redirect();
}


public function handleProviderCallback($provider)
{
    dd($provider);//Not reaching here
}

Services.php file

'facebook' => [
    'client_id' => 'xxxxxx',
    'client_secret' => 'xxxxxx',
    'redirect' => 'http://localhost:8000/customer/facebook/callback',
],
Shwetank
  • 374
  • 1
  • 6
  • 20
  • Could it be that your configured `redirect` is pointing to localhost ? – Mike Mar 28 '18 at 09:04
  • I don't think it's the issue as in earlier projects it was working fine. I have tried changing the redirect point and it redirected, but when the redirect point is saved as above it throws the error shown in the screenshot. @Mike – Shwetank Mar 28 '18 at 09:14
  • can you check the response header, which url its redirect to? – Ben Mar 30 '18 at 06:28

0 Answers0