I am trying to apply the login and registration session of facebook in my laravel application, I used the package socialite and added the credentials in my file servece.php and added the web.php routes how can you notice
Blocked URL: The redirect failed because the URI is not included in the white list of the OAuth client settings of the application. Verify that OAuth client access and OAuth web access are enabled, and add all domains in the application as valid OAuth redirect URIs. enter image description here
'facebook' => [
'client_id' => env('FACEBOOK_ID'),
'client_secret' => env('FACEBOOK_SECRET'),
'redirect' => env('FACEBOOK_URL'),
],
data I have in .env file and the redirect FACEBOOK_URL=http://127.0.0.1:8000/auth/facebook/callback
web.php Route::get('auth/{provider}', 'Auth\[email protected]'); Route::get('auth/{provider}/callback', 'Auth\[email protected]');
LoginController:
public function redirectToProvider($provider)
{
return Socialite::driver($provider)->redirect();
}
public function handleProviderCallback($provider)
{
$user = Socialite::driver($provider)->user();
$authUser = $this->findOrCreateUser($user, $provider);
Auth::login($authUser, true);
return redirect($this->redirectTo);
}
in the developer facebook page I can not enable or disable the option Use strict mode for redirect URI as you could