From 10a5eb46f93686f9256f780ad516c502b9f4e9d1 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 23 Feb 2022 11:02:09 +0100 Subject: [PATCH] Remove the Google Calendar read-only scope use as it is not needed (#1212) --- application/libraries/Google_sync.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/libraries/Google_sync.php b/application/libraries/Google_sync.php index 85fdac07..04b5e7fa 100644 --- a/application/libraries/Google_sync.php +++ b/application/libraries/Google_sync.php @@ -53,8 +53,12 @@ class Google_sync { $this->CI =& get_instance(); // Initialize google client and calendar service. + $http = new GuzzleHttp\Client([ + 'verify' => false + ]); + $this->client = new Google_Client(); - + $this->client->setHttpClient($http); $this->client->setApplicationName(config('google_application_name')); $this->client->setClientId(config('google_client_id')); $this->client->setClientSecret(config('google_client_secret')); @@ -64,7 +68,7 @@ class Google_sync { $this->client->setAccessType('offline'); $this->client->addScope([ Google_Service_Calendar::CALENDAR, - Google_Service_Calendar::CALENDAR_READONLY + // Google_Service_Calendar::CALENDAR_READONLY ]); $this->service = new Google_Service_Calendar($this->client);