@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
|
@@ -112,6 +112,12 @@ export class OxyServicesBase {
|
|
|
112
112
|
const unsubscribe = this.onTokensChanged(syncToken);
|
|
113
113
|
client.setAuthRefreshHandler(async (reason) => {
|
|
114
114
|
const refreshed = await this.httpService.refreshAccessToken(reason);
|
|
115
|
+
if (!refreshed) {
|
|
116
|
+
if (reason === 'response-401') {
|
|
117
|
+
this.clearTokens();
|
|
118
|
+
}
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
115
121
|
syncToken(refreshed);
|
|
116
122
|
return refreshed;
|
|
117
123
|
});
|