calling oauth authorize again if the refresh token is expired

This commit is contained in:
antelle 2020-12-17 19:25:36 +01:00
parent ccfd5126bc
commit b4b6ef3206
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 5 additions and 2 deletions

View File

@ -447,9 +447,12 @@ class StorageBase {
if (xhr.status === 400) {
delete this.runtimeData[this.name + 'OAuthToken'];
this._oauthToken = null;
this.logger.error('Error exchanging refresh token, trying to authorize again');
this._oauthAuthorize(callback);
} else {
this.logger.error('Error exchanging refresh token', err);
callback?.('Error exchanging refresh token');
}
this.logger.error('Error exchanging refresh token', err);
callback?.('Error exchanging refresh token');
}
});
}