@oxyhq/core 3.4.6 → 3.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -115,6 +115,12 @@ class OxyServicesBase {
115
115
  const unsubscribe = this.onTokensChanged(syncToken);
116
116
  client.setAuthRefreshHandler(async (reason) => {
117
117
  const refreshed = await this.httpService.refreshAccessToken(reason);
118
+ if (!refreshed) {
119
+ if (reason === 'response-401') {
120
+ this.clearTokens();
121
+ }
122
+ return null;
123
+ }
118
124
  syncToken(refreshed);
119
125
  return refreshed;
120
126
  });