@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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/OxyServices.base.js +6 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/OxyServices.base.js +6 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/OxyServices.base.ts +7 -0
- package/src/__tests__/linkedClient.test.ts +28 -0
|
@@ -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
|
});
|