Hi guys,
I implemented google and facebook oauth on my website. Everything worked fine and then today I noticed that it doesn’t work anymore. I have not change anything in the google and facebook console and I don’t remember changing codes related to that lately.
Google oauth works with my localhost but not in production.
The google login window appears but I can this error when it redirect me to my website.
See the call stack below (it’s not complete). Can someone help me I don’t know where to start.
TypeError
Argument 2 passed to yii\httpclient\Client::createResponse() must be of the type array, null given, called in /home/folder/vendor/yiisoft/yii2-httpclient/StreamTransport.php on line 73
1. in /home/folder/vendor/yiisoft/yii2-httpclient/Client.php at line 200
return Yii::createObject($config);
}
/**
* Creates a response instance.
* @param string $content raw content
* @param array $headers headers list.
* @return Response request instance.
*/
200 public function createResponse($content = null, array $headers = [])
{
$config = $this->responseConfig;
if (!isset($config['class'])) {
$config['class'] = Response::className();
}
$config['client'] = $this;
$response = Yii::createObject($config);
$response->setContent($content);
$response->setHeaders($headers);
2. in /home/folder/vendor/yiisoft/yii2-httpclient/StreamTransport.php at line 73 – yii\httpclient\Client::createResponse(false, null)
Yii::endProfile($token, __METHOD__);
throw new Exception($e->getMessage(), $e->getCode(), $e);
}
Yii::endProfile($token, __METHOD__);
73 $response = $request->client->createResponse($responseContent, $responseHeaders);
$request->afterSend($response);
return $response;
}