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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user