vendredi 3 avril 2020

Socialite handleProviderCallback() function doesn't show saved session value

I am using socialite in my laravel project and want to fetch the session value in its handleProviderCallback() function. I am saving the session at home page but cant access it in handleProviderCallback() function. Here is my code.

Saving session in indexController.php

\Session::put('name','value');

Trying to get the value in handleProviderCallback function but its not working.

public function handleProviderCallback()
{

$user = Socialite::driver('facebook')->stateless()->user();

echo \Session()->get('name');

}

Creating session code is working fine and the session is being saved I have fetched in other methods but its not working in handleProviderCallback function. Any idea what I am doing wrong? TIA.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire