@iblai/web-utils 1.10.2 → 1.10.3
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 +3 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -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
|
@@ -1025,7 +1025,7 @@ declare const isNode: () => string | false;
|
|
|
1025
1025
|
declare const isExpo: () => any;
|
|
1026
1026
|
declare const isTauri: () => boolean;
|
|
1027
1027
|
declare function isSafariBrowser(): boolean;
|
|
1028
|
-
declare const getPlatform: () => "
|
|
1028
|
+
declare const getPlatform: () => "react-native" | "web" | "node" | "unknown";
|
|
1029
1029
|
declare const safeRequire: (moduleName: string) => any;
|
|
1030
1030
|
declare const getNextNavigation: () => any;
|
|
1031
1031
|
|
package/dist/index.esm.js
CHANGED
|
@@ -9369,10 +9369,11 @@ function useAuthProvider({ middleware = new Map(), onAuthSuccess, onAuthFailure,
|
|
|
9369
9369
|
var _a;
|
|
9370
9370
|
try {
|
|
9371
9371
|
setIsAuthenticating(true);
|
|
9372
|
-
|
|
9372
|
+
const authToken = await (storageService === null || storageService === void 0 ? void 0 : storageService.getItem(LOCAL_STORAGE_KEYS.AUTH_TOKEN));
|
|
9373
|
+
if (authToken && !hasNonExpiredAuthToken()) {
|
|
9373
9374
|
const reason = "Auth token expired";
|
|
9374
9375
|
onAuthFailure === null || onAuthFailure === void 0 ? void 0 : onAuthFailure(reason);
|
|
9375
|
-
console.log("[auth-redirect] Auth token has expired"
|
|
9376
|
+
console.log("[auth-redirect] Auth token has expired");
|
|
9376
9377
|
safeRedirectToAuthSpa(undefined, undefined, true);
|
|
9377
9378
|
return;
|
|
9378
9379
|
}
|