Hi Guys,
Hope someone could help with this issue.
We are using AuthClient for Social Signup and Login. Feature is working fine locally on Windows XAMPP (PHP 5.6) but on the server (Amazon Ec2 AMI, PHP 5.6), code is not saving session data.
public function onAuthSuccess($client)
{
//.... COMMENTED CODE
$session = Yii::$app->session;
//Store social info in session
$session['socialClient'] = $_GET['authclient'];
return;
}
When we are trying to access the session data set in the above function in the following Controller Action, the session data is never saved.
Weirdly after hours of research, if we use the PHP standard header() and exit() then it all works, fine.
header("Location: " . $authObj->getSuccessUrl());
exit();
I have tried all the combination, but still no luck.
e.g. return $this->redirect()
I am not sure if its a PHP issue or something to do with YII2 session handling. There are few other screens, where I believe the session is not saving as client has logged few bugs recently related to data loss, while the code logic is fine and works locally.
Any help would be of great help.
Thanks