@lgsm/modules 1.6.7 → 1.6.9

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.
Files changed (2) hide show
  1. package/dist/main.js +14 -12
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -7169,14 +7169,18 @@ function Wu(e, t, n) {
7169
7169
  var s, a, i, u, c, d, l, b, x, h;
7170
7170
  const o = r.response.status;
7171
7171
  if (o == 401 || (a = (s = r.response) == null ? void 0 : s.data) != null && a.message.includes("expired") || (u = (i = r.response) == null ? void 0 : i.data) != null && u.message.includes("revoked"))
7172
- window.sessionStorage.getItem("hasReloadedFor401") ? (window.sessionStorage.removeItem("hasReloadedFor401"), lr("Unauthorized", "Your session has expired. Please log in again."), setTimeout(() => {
7173
- iu(n);
7174
- }, 1500)) : (window.sessionStorage.setItem("hasReloadedFor401", "true"), typeof cr == "function" && cr(
7175
- "Access Token Expired",
7176
- "Access token has expired, trying to refresh token..."
7177
- ), setTimeout(() => {
7178
- window.location.reload();
7179
- }, 1500));
7172
+ if (window.sessionStorage.getItem("hasReloadedFor401"))
7173
+ window.sessionStorage.removeItem("hasReloadedFor401"), document.cookie = "refresh_token=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/", lr("Session Ended", "Your session has ended. Please log in again to continue."), setTimeout(() => {
7174
+ iu(n);
7175
+ }, 1500);
7176
+ else
7177
+ return window.sessionStorage.setItem("hasReloadedFor401", "true"), typeof cr == "function" && cr(
7178
+ "Session Expired",
7179
+ "Your session has expired. We are refreshing your session, please wait..."
7180
+ ), setTimeout(() => {
7181
+ window.location.reload();
7182
+ }, 1500), new Promise(() => {
7183
+ });
7180
7184
  else if (o > 299) {
7181
7185
  const p = ((c = r.config) == null ? void 0 : c.url) || "", g = p.substring(p.lastIndexOf("/"));
7182
7186
  lr(
@@ -7218,10 +7222,8 @@ const Ku = {
7218
7222
  }
7219
7223
  }
7220
7224
  }, iu = (e) => {
7221
- const t = window.location.href;
7222
- window.location.href = `${e ?? "http://solo.gdc.com:3100/login"}?redirect_to=${encodeURIComponent(
7223
- t
7224
- )}`;
7225
+ const t = window.location.href, n = `${e ?? "https://login.lgsm-dev.com/login"}?redirect_to=${encodeURIComponent(t)}`;
7226
+ window.location.replace(n);
7225
7227
  };
7226
7228
  class rt extends Error {
7227
7229
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lgsm/modules",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "vite build",