May I ask - is there a way of me to pass my own form input values to the Socialite provider (Facebook for now) and then receive those parameters in my callback uri again?
I have a multi step sign up form and would not want to user to Login on the first step but only on the second step. Challenge here is though I need to somehow remember the input values on step one after authentication via Facebook :)
Or should I make use of Session variables rather? Or what else can you Geniuses suggest here?
I've encountered a problem like this before. After some research I did not find any way to do that with Socialite (maybe it has implemented this feature since, dunno), so I went with sessions:
public function redirectToFacebookProvider()
{
// save anything you will need later, for example an url to come back to
Session::put('url.intended', URL::previous());
return Socialite::driver('facebook')->redirect();
}
public function handleFacebookProviderCallback()
{
// handling....
$url = Session::get('url.intended', url('/'));
Session::forget('url.intended');
return redirect($url);
}