diff --git a/lib/classes/oauth2/client.php b/lib/classes/oauth2/client.php index 574ea943438..6c49aaaa67c 100644 --- a/lib/classes/oauth2/client.php +++ b/lib/classes/oauth2/client.php @@ -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(); }