@iblai/web-utils 1.2.11 → 1.2.12
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/index.d.ts +1 -1
- package/dist/index.esm.js +10 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -814,7 +814,7 @@ declare const isWeb: () => boolean;
|
|
|
814
814
|
declare const isNode: () => string | false;
|
|
815
815
|
declare const isExpo: () => any;
|
|
816
816
|
declare const isTauri: () => boolean;
|
|
817
|
-
declare const getPlatform: () => "
|
|
817
|
+
declare const getPlatform: () => "react-native" | "web" | "node" | "unknown";
|
|
818
818
|
declare const safeRequire: (moduleName: string) => any;
|
|
819
819
|
declare const getNextNavigation: () => any;
|
|
820
820
|
|
package/dist/index.esm.js
CHANGED
|
@@ -2994,9 +2994,17 @@ function useAuthProvider({ middleware = new Map(), onAuthSuccess, onAuthFailure,
|
|
|
2994
2994
|
const dmTokenInLocalStorage = await storageService.getItem(LOCAL_STORAGE_KEYS.DM_TOKEN_KEY);
|
|
2995
2995
|
const dmTokenExpired = await isDmTokenExpired(storageService);
|
|
2996
2996
|
if (!dmTokenInLocalStorage || dmTokenExpired) {
|
|
2997
|
-
console.log(
|
|
2997
|
+
console.log();
|
|
2998
|
+
if (!!dmTokenInLocalStorage) {
|
|
2999
|
+
console.log("[auth-redirect] DM token doesn't exists");
|
|
3000
|
+
}
|
|
3001
|
+
else {
|
|
3002
|
+
console.log("[auth-redirect] DM token doesn't exists, forcing logout");
|
|
3003
|
+
}
|
|
2998
3004
|
// Clear all auth-related storage keys
|
|
2999
|
-
|
|
3005
|
+
if (!!dmTokenInLocalStorage) {
|
|
3006
|
+
clearAuthCookies();
|
|
3007
|
+
}
|
|
3000
3008
|
const reason = "DM token expired";
|
|
3001
3009
|
onAuthFailure === null || onAuthFailure === void 0 ? void 0 : onAuthFailure(reason);
|
|
3002
3010
|
safeRedirectToAuthSpa(undefined, undefined, !!dmTokenInLocalStorage); // with no dm token at all in storage, don't force logout
|