@vc-shell/framework 2.6.3-rc.0-pr380.4cc53e8 → 2.6.3-rc.0-pr380.8dc951a
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.
|
@@ -6,22 +6,23 @@ export interface AuthGuardDeps {
|
|
|
6
6
|
authState: Readonly<Ref<AuthState>>;
|
|
7
7
|
/** Asks the platform for the current user; deduplicated with a load already in flight. */
|
|
8
8
|
loadUser: () => Promise<unknown>;
|
|
9
|
-
/** Called when the session still cannot be checked; the
|
|
9
|
+
/** Called when the session still cannot be checked; the navigation then proceeds. */
|
|
10
10
|
onSessionCheckFailed: () => void;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
* not be checked), and a location redirects to Login.
|
|
15
|
-
*/
|
|
16
|
-
export type AuthGuardResult = undefined | false | RouteLocationRaw;
|
|
12
|
+
/** Result of the auth guard: `undefined` allows the navigation, and a location redirects to Login. */
|
|
13
|
+
export type AuthGuardResult = undefined | RouteLocationRaw;
|
|
17
14
|
/**
|
|
18
15
|
* The root-route auth guard.
|
|
19
16
|
*
|
|
20
17
|
* Only a definitive "not signed in" (`anonymous`) leads to Login. While the session is `unknown` —
|
|
21
18
|
* the start-up load has not answered yet, or failed with a 5xx / dropped connection — the user is
|
|
22
|
-
* asked for once more; if the platform still gives no answer, the
|
|
23
|
-
*
|
|
24
|
-
*
|
|
19
|
+
* asked for once more; if the platform still gives no answer, the failure is reported and the
|
|
20
|
+
* navigation proceeds: the session is left alone, as the platform's admin UI leaves it when
|
|
21
|
+
* `currentuser` fails. Treating a failed load as "not signed in" is what ended live sessions on a
|
|
22
|
+
* server blip (VM-1829).
|
|
23
|
+
*
|
|
24
|
+
* The navigation is deliberately not cancelled: on the initial navigation that rejects
|
|
25
|
+
* `router.isReady()`, which apps await before mounting — the app would never mount.
|
|
25
26
|
*/
|
|
26
27
|
export declare function authGuard(to: RouteLocationNormalized, deps: AuthGuardDeps): Promise<AuthGuardResult>;
|
|
27
28
|
//# sourceMappingURL=authGuard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authGuard.d.ts","sourceRoot":"","sources":["../../../core/utilities/authGuard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,WAAW,aAAa;IAC5B,4DAA4D;IAC5D,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;IACpC,0FAA0F;IAC1F,QAAQ,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC,
|
|
1
|
+
{"version":3,"file":"authGuard.d.ts","sourceRoot":"","sources":["../../../core/utilities/authGuard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,WAAW,aAAa;IAC5B,4DAA4D;IAC5D,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;IACpC,0FAA0F;IAC1F,QAAQ,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC,qFAAqF;IACrF,oBAAoB,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,sGAAsG;AACtG,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,gBAAgB,CAAC;AAE3D;;;;;;;;;;;;GAYG;AACH,wBAAsB,SAAS,CAAC,EAAE,EAAE,uBAAuB,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC,CAkB1G"}
|
package/dist/framework.js
CHANGED
|
@@ -1818,8 +1818,10 @@ function yo(e) {
|
|
|
1818
1818
|
}
|
|
1819
1819
|
async function Bo(e, t) {
|
|
1820
1820
|
if (e.meta.root === !0) {
|
|
1821
|
-
if (t.authState.value === "unknown" && await t.loadUser(), t.authState.value === "unknown")
|
|
1822
|
-
|
|
1821
|
+
if (t.authState.value === "unknown" && await t.loadUser(), t.authState.value === "unknown") {
|
|
1822
|
+
t.onSessionCheckFailed();
|
|
1823
|
+
return;
|
|
1824
|
+
}
|
|
1823
1825
|
if (t.authState.value === "anonymous")
|
|
1824
1826
|
return localStorage.setItem("redirectAfterLogin", e.fullPath), { name: "Login" };
|
|
1825
1827
|
}
|
|
@@ -2117,12 +2119,12 @@ function qo() {
|
|
|
2117
2119
|
hasNotification: (t) => e.hasNotification(t)
|
|
2118
2120
|
});
|
|
2119
2121
|
}
|
|
2120
|
-
const Yo = "2.6.3-rc.0-pr380.
|
|
2122
|
+
const Yo = "2.6.3-rc.0-pr380.8dc951a";
|
|
2121
2123
|
function Zo() {
|
|
2122
2124
|
return {
|
|
2123
2125
|
version: Yo,
|
|
2124
|
-
buildDate: "2026-10-
|
|
2125
|
-
gitHash: "
|
|
2126
|
+
buildDate: "2026-10-06T17:19:51.553Z",
|
|
2127
|
+
gitHash: "8dc951ace"
|
|
2126
2128
|
};
|
|
2127
2129
|
}
|
|
2128
2130
|
function jo(e = Zo()) {
|