Commit 59c2d339 authored by Sascha Brüggenolte's avatar Sascha Brüggenolte
Browse files

Merge branch '37546' into '3.2'

37546-Fix issue with SDK

See merge request !7
parents eae98f48 31aae17f
......@@ -42,21 +42,20 @@ class GoogleSdkFactory
*
* @throws GoogleSdkFactoryException
*/
public function getClient($applicationName, $developerKey, array $config = [], $cacheKey = null): \Google_Client
public function getClient($applicationName, $clientId, $clientSecret, $cacheKey = null): \Google_Client
{
$this->loadLibrary();
$config += [
$config = [
'application_name' => $applicationName,
'developer_key' => $developerKey,
'client_id' => $clientId,
'client_secret' => $clientSecret
];
$cacheKey = $cacheKey ?? $developerKey;
$client = self::$clients[$cacheKey];
if (!$client instanceof \Google_Client) {
$client = self::$clients[$cacheKey] = new \Google_Client($config);
$client = new \Google_Client($config);
$client->addScope(\Google_Service_PeopleService::USERINFO_PROFILE);
$client->addScope(\Google_Service_PeopleService::USER_ADDRESSES_READ);
......@@ -64,7 +63,6 @@ class GoogleSdkFactory
$client->addScope(\Google_Service_PeopleService::USERINFO_EMAIL);
}
return $client;
}
......
......@@ -5,11 +5,20 @@
<label lang="de">Google SDK</label>
<label lang="en">Google SDK</label>
<version>3.2.0</version>
<version>3.2.1</version>
<link>http://www.netinventors.de</link>
<author>Net Inventors GmbH</author>
<compatibility minVersion="5.6.0" />
<changelog version="3.2.1">
<changes lang="de"><![CDATA[
[#37546] Exception behoben die von der SDK verursacht wird
]]></changes>
<changes lang="en"><![CDATA[
[#37546] Fixed an exception caused by the SDK
]]></changes>
</changelog>
<changelog version="3.2.0">
<changes lang="de"><![CDATA[
[#33238] Version der SDK wurde angepasst
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment