MDL-59510 core_oauth2: autorefresh google drive, nextcloud and onedrive

Request additional offline access, allowing the repository to sign in
automatically each time, including across different user sessions, until
either the refresh token is invalidated or the user logs out of the
repository.
This commit is contained in:
Jake Dallimore
2020-10-05 09:17:14 +08:00
parent eb6b828b81
commit 57bb99edd4
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ class repository_googledocs extends repository {
$returnurl->param('sesskey', sesskey());
}
$this->client = \core\oauth2\api::get_user_oauth_client($this->issuer, $returnurl, self::SCOPES);
$this->client = \core\oauth2\api::get_user_oauth_client($this->issuer, $returnurl, self::SCOPES, true);
return $this->client;
}
+1 -1
View File
@@ -574,7 +574,7 @@ class repository_nextcloud extends repository {
$returnurl->param('repo_id', $this->id);
$returnurl->param('sesskey', sesskey());
}
$this->client = \core\oauth2\api::get_user_oauth_client($this->issuer, $returnurl, self::SCOPES);
$this->client = \core\oauth2\api::get_user_oauth_client($this->issuer, $returnurl, self::SCOPES, true);
return $this->client;
}
+1 -1
View File
@@ -93,7 +93,7 @@ class repository_onedrive extends repository {
$returnurl->param('sesskey', sesskey());
}
$this->client = \core\oauth2\api::get_user_oauth_client($this->issuer, $returnurl, self::SCOPES);
$this->client = \core\oauth2\api::get_user_oauth_client($this->issuer, $returnurl, self::SCOPES, true);
return $this->client;
}