@atlashub/smartstack 2.13.0 → 2.14.0-preview.584
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/contexts/AuthContext.d.ts.map +1 -1
- package/dist/pages/LoginPage.d.ts.map +1 -1
- package/dist/pages/auth/AuthCallbackPage.d.ts.map +1 -1
- package/dist/services/api/apiClient.d.ts.map +1 -1
- package/dist/smartstack.cjs +2 -2
- package/dist/smartstack.cjs.map +1 -1
- package/dist/smartstack.js +9 -6
- package/dist/smartstack.js.map +1 -1
- package/package.json +1 -1
package/dist/smartstack.js
CHANGED
|
@@ -696,7 +696,10 @@ vt.interceptors.response.use(
|
|
|
696
696
|
"/api/auth/session-info",
|
|
697
697
|
"/api/auth/refresh",
|
|
698
698
|
"/api/navigation/menu",
|
|
699
|
-
"/api/navigation/favorites"
|
|
699
|
+
"/api/navigation/favorites",
|
|
700
|
+
"/api/navigation/contexts",
|
|
701
|
+
"/api/onboarding/status",
|
|
702
|
+
"/api/platform/administration/tenants/tenant-analytics/track/"
|
|
700
703
|
].some((d) => p.startsWith(d));
|
|
701
704
|
if (!window.location.pathname.includes("/login") && !c) {
|
|
702
705
|
localStorage.removeItem("token"), localStorage.removeItem("refreshToken"), localStorage.removeItem("user");
|
|
@@ -1603,7 +1606,7 @@ function xu({ children: r }) {
|
|
|
1603
1606
|
localStorage.getItem(Aa) && await ce.post("/api/auth/logout");
|
|
1604
1607
|
} catch {
|
|
1605
1608
|
}
|
|
1606
|
-
localStorage.removeItem(Aa), localStorage.removeItem(Ta), s(null), window.location.href = "/login";
|
|
1609
|
+
localStorage.removeItem(Aa), localStorage.removeItem("refreshToken"), localStorage.removeItem(Ta), s(null), window.location.href = "/login";
|
|
1607
1610
|
}, []), d = j((b) => {
|
|
1608
1611
|
o(b);
|
|
1609
1612
|
}, []), h = j((b) => {
|
|
@@ -1627,7 +1630,7 @@ function xu({ children: r }) {
|
|
|
1627
1630
|
localStorage.getItem(Aa) && !a ? ce.get("/api/auth/me").then((v) => {
|
|
1628
1631
|
s(v), localStorage.setItem(Ta, JSON.stringify(v));
|
|
1629
1632
|
}).catch(() => {
|
|
1630
|
-
localStorage.removeItem(Aa), localStorage.removeItem(Ta);
|
|
1633
|
+
localStorage.removeItem(Aa), localStorage.removeItem("refreshToken"), localStorage.removeItem(Ta);
|
|
1631
1634
|
}).finally(() => l(!1)) : l(!1);
|
|
1632
1635
|
}, [a]), me(() => {
|
|
1633
1636
|
const b = () => {
|
|
@@ -6138,7 +6141,7 @@ function Kh() {
|
|
|
6138
6141
|
try {
|
|
6139
6142
|
ft.logEvent("login_attempt", "auth", { email: r });
|
|
6140
6143
|
const v = qd(), g = await Vd(), y = await ce.post("/api/auth/login", { email: r, password: s, deviceType: v, clientIp: g });
|
|
6141
|
-
localStorage.setItem("token", y.token), localStorage.setItem("user", JSON.stringify(y.user)), ft.logEvent("login_success", "auth", { email: r }), c("prefs");
|
|
6144
|
+
localStorage.setItem("token", y.token), localStorage.setItem("refreshToken", y.refreshToken), localStorage.setItem("user", JSON.stringify(y.user)), ft.logEvent("login_success", "auth", { email: r }), c("prefs");
|
|
6142
6145
|
try {
|
|
6143
6146
|
if (!(await ce.get("/api/onboarding/status")).hasCompletedOnboarding) {
|
|
6144
6147
|
window.location.href = "/auth/onboarding";
|
|
@@ -7087,11 +7090,11 @@ function Zh() {
|
|
|
7087
7090
|
n("error"), i(Yh[d] || "Une erreur est survenue lors de l'authentification.");
|
|
7088
7091
|
return;
|
|
7089
7092
|
}
|
|
7090
|
-
u && c ? o(u) : (n("error"), i("Paramètres d'authentification manquants."));
|
|
7093
|
+
u && c ? o(u, c) : (n("error"), i("Paramètres d'authentification manquants."));
|
|
7091
7094
|
}, [r]);
|
|
7092
7095
|
const o = async (u, c) => {
|
|
7093
7096
|
try {
|
|
7094
|
-
localStorage.setItem("token", u);
|
|
7097
|
+
localStorage.setItem("token", u), localStorage.setItem("refreshToken", c);
|
|
7095
7098
|
try {
|
|
7096
7099
|
const x = await Vd(), b = qd();
|
|
7097
7100
|
(x || b) && await fetch("/api/auth/update-session-client-info", {
|