From 36937a6492785581c33bf53e2f276dddcbb61426 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Tue, 11 Jul 2023 07:50:16 +0200 Subject: [PATCH] Remove the Google Product Name and Google API Key config values as they are no longer needed --- application/config/google.php | 3 --- application/libraries/Google_sync.php | 3 +-- config-sample.php | 2 -- docs/docker.md | 2 -- docs/google-calendar-sync.md | 2 -- 5 files changed, 1 insertion(+), 11 deletions(-) diff --git a/application/config/google.php b/application/config/google.php index 31281e80..f511e45b 100644 --- a/application/config/google.php +++ b/application/config/google.php @@ -12,10 +12,7 @@ $config['google_sync_feature'] = Config::GOOGLE_SYNC_FEATURE; -$config['google_product_name'] = Config::GOOGLE_PRODUCT_NAME; - $config['google_client_id'] = Config::GOOGLE_CLIENT_ID; $config['google_client_secret'] = Config::GOOGLE_CLIENT_SECRET; -$config['google_api_key'] = Config::GOOGLE_API_KEY; diff --git a/application/libraries/Google_sync.php b/application/libraries/Google_sync.php index 0b66bc9c..fd09fab1 100644 --- a/application/libraries/Google_sync.php +++ b/application/libraries/Google_sync.php @@ -65,10 +65,9 @@ class Google_sync { $this->client = new Google_Client(); $this->client->setHttpClient($http); - $this->client->setApplicationName(config('google_application_name')); + $this->client->setApplicationName('Easy!Appointments'); $this->client->setClientId(config('google_client_id')); $this->client->setClientSecret(config('google_client_secret')); - $this->client->setDeveloperKey(config('google_api_key')); $this->client->setRedirectUri(site_url('google/oauth_callback')); $this->client->setPrompt('consent'); $this->client->setAccessType('offline'); diff --git a/config-sample.php b/config-sample.php index 90ad9c49..e2723755 100644 --- a/config-sample.php +++ b/config-sample.php @@ -48,8 +48,6 @@ class Config { // ------------------------------------------------------------------------ const GOOGLE_SYNC_FEATURE = FALSE; // Enter TRUE or FALSE - const GOOGLE_PRODUCT_NAME = ''; const GOOGLE_CLIENT_ID = ''; const GOOGLE_CLIENT_SECRET = ''; - const GOOGLE_API_KEY = ''; } diff --git a/docs/docker.md b/docs/docker.md index 1976b312..d9baadf0 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -30,10 +30,8 @@ class Config { // ------------------------------------------------------------------------ const GOOGLE_SYNC_FEATURE = FALSE; // You can optionally enable the Google Sync feature. - const GOOGLE_PRODUCT_NAME = ''; const GOOGLE_CLIENT_ID = ''; const GOOGLE_CLIENT_SECRET = ''; - const GOOGLE_API_KEY = ''; } ``` diff --git a/docs/google-calendar-sync.md b/docs/google-calendar-sync.md index ef69c3ac..c29c4283 100644 --- a/docs/google-calendar-sync.md +++ b/docs/google-calendar-sync.md @@ -28,10 +28,8 @@ Customers will be able to sync their appointments with their Google Calendars bu To enable the synchronization edit your root config.php file and update the Google Calendar Sync section with your API credentials. - `GOOGLE_SYNC_FEATURE` needs to be set to `TRUE`. - - `GOOGLE_PRODUCT_NAME` needs to have the same name as the Google Cloud Console project. - `GOOGLE_CLIENT_ID` needs the client ID from the OAuth2 credentials. - `GOOGLE_CLIENT_SECRET` needs the client secret from the OAuth2 credentials. - - `GOOGLE_API_KEY` needs the API key created in the previous section. 4. **Link Google Calendar and Easy!Appointments**: Go to backend/calendar page, select a provider and click on the "Enable Sync" button. A new window will pop up asking you to grant concern. Enter the user's credentials and the sync will be activated!