Merge branch 'MDL-70430-master-oauth2refreshtoken' of git://github.com/mudrd8mz/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2020-12-22 00:06:32 +01:00
commit 2a698951e5

View File

@ -473,7 +473,7 @@ class client extends \oauth2_client {
// Store the access token and, if provided by the server, the new refresh token.
$this->store_token($receivedtokens['access_token']);
if (isset($receivedtokens['refreshtoken'])) {
if (isset($receivedtokens['refresh_token'])) {
$systemaccount->set('refreshtoken', $receivedtokens['refresh_token']->token);
$systemaccount->update();
}