mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
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:
parent
f5046a5a1d
commit
255a910c92
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user