squarefi-bff-api-module 1.5.3 → 1.5.4
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.
|
@@ -73,7 +73,7 @@ const createApiClient = ({ baseURL, isBearerToken, tenantId }) => {
|
|
|
73
73
|
const isRefreshAvailable = (!isTokenRefreshing && typeof refreshToken === 'string') || (0, sdk_react_1.isTMA)();
|
|
74
74
|
if (isLogoutNeccesary) {
|
|
75
75
|
if (typeof window !== 'undefined') {
|
|
76
|
-
|
|
76
|
+
window.location.href = '/logout';
|
|
77
77
|
(0, tokensFactory_1.deleteTokens)();
|
|
78
78
|
}
|
|
79
79
|
requestQueue = [];
|
|
@@ -89,7 +89,7 @@ const createApiClient = ({ baseURL, isBearerToken, tenantId }) => {
|
|
|
89
89
|
})
|
|
90
90
|
.catch((tokenRefreshError) => {
|
|
91
91
|
if (typeof window !== 'undefined') {
|
|
92
|
-
|
|
92
|
+
window.location.href = '/logout';
|
|
93
93
|
(0, tokensFactory_1.deleteTokens)();
|
|
94
94
|
}
|
|
95
95
|
requestQueue = [];
|
package/package.json
CHANGED
|
@@ -79,7 +79,7 @@ export const createApiClient = ({ baseURL, isBearerToken, tenantId }: CreateApiC
|
|
|
79
79
|
|
|
80
80
|
if (isLogoutNeccesary) {
|
|
81
81
|
if (typeof window !== 'undefined') {
|
|
82
|
-
|
|
82
|
+
window.location.href = '/logout';
|
|
83
83
|
deleteTokens();
|
|
84
84
|
}
|
|
85
85
|
requestQueue = [];
|
|
@@ -95,7 +95,7 @@ export const createApiClient = ({ baseURL, isBearerToken, tenantId }: CreateApiC
|
|
|
95
95
|
})
|
|
96
96
|
.catch((tokenRefreshError) => {
|
|
97
97
|
if (typeof window !== 'undefined') {
|
|
98
|
-
|
|
98
|
+
window.location.href = '/logout';
|
|
99
99
|
deleteTokens();
|
|
100
100
|
}
|
|
101
101
|
requestQueue = [];
|