@iblai/web-utils 1.10.0 → 1.10.2

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.esm.js CHANGED
@@ -9369,10 +9369,10 @@ function useAuthProvider({ middleware = new Map(), onAuthSuccess, onAuthFailure,
9369
9369
  var _a;
9370
9370
  try {
9371
9371
  setIsAuthenticating(true);
9372
- if (!hasNonExpiredAuthToken()) {
9372
+ if ((storageService === null || storageService === void 0 ? void 0 : storageService.getItem(LOCAL_STORAGE_KEYS.AUTH_TOKEN)) && !hasNonExpiredAuthToken()) {
9373
9373
  const reason = "Auth token expired";
9374
9374
  onAuthFailure === null || onAuthFailure === void 0 ? void 0 : onAuthFailure(reason);
9375
- console.log("[auth-redirect] Auth token expired");
9375
+ console.log("[auth-redirect] Auth token has expired", storageService === null || storageService === void 0 ? void 0 : storageService.getItem(LOCAL_STORAGE_KEYS.AUTH_TOKEN));
9376
9376
  safeRedirectToAuthSpa(undefined, undefined, true);
9377
9377
  return;
9378
9378
  }