Added scope to the Google Calendar connection flow to enforce the user consent screen.

This commit is contained in:
Alex Tselegidis 2020-11-30 21:34:12 +02:00
parent f6ee08608a
commit e8655066fd

View file

@ -62,6 +62,7 @@ class Google_Sync {
$this->client->setClientSecret($this->CI->config->item('google_client_secret')); $this->client->setClientSecret($this->CI->config->item('google_client_secret'));
$this->client->setDeveloperKey($this->CI->config->item('google_api_key')); $this->client->setDeveloperKey($this->CI->config->item('google_api_key'));
$this->client->setRedirectUri(site_url('google/oauth_callback')); $this->client->setRedirectUri(site_url('google/oauth_callback'));
$this->client->setPrompt('consent');
$this->client->setAccessType('offline'); $this->client->setAccessType('offline');
$this->client->addScope([ $this->client->addScope([
Google_Service_Calendar::CALENDAR, Google_Service_Calendar::CALENDAR,