@burdenoff/fe-libs 2026.523.1 → 2026.525.1
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.
|
@@ -14,28 +14,6 @@
|
|
|
14
14
|
export declare function shouldSkipSSORedirect(returnPath?: string): boolean;
|
|
15
15
|
export declare function hasRecentSSORedirectAttempt(relayOrigin: string, returnTo: string): boolean;
|
|
16
16
|
export declare function markSSORedirectAttempt(relayOrigin: string, returnTo: string): void;
|
|
17
|
-
/**
|
|
18
|
-
* Check if an SSO redirect should be initiated.
|
|
19
|
-
* Returns the redirect URL if SSO should happen, null otherwise.
|
|
20
|
-
*
|
|
21
|
-
* Call this from ProtectedRoute or LandingOrDashboardRedirect
|
|
22
|
-
* before showing login page.
|
|
23
|
-
*
|
|
24
|
-
* Two discovery paths:
|
|
25
|
-
* 1. `bf-sso` cookie on the current origin pointing at a different
|
|
26
|
-
* product origin (set during a previous same-origin login). Used when
|
|
27
|
-
* the cookie can travel cross-subdomain (e.g. *.local.burdenoff.com).
|
|
28
|
-
* Falls through silently otherwise.
|
|
29
|
-
* 2. Central bridge host (alphaapp/app.burdenoff.com) fallback: cross
|
|
30
|
-
* eTLD+1 product hostnames can't share cookies with each other, so we
|
|
31
|
-
* optimistically redirect to the bridge host's `/auth/sso-relay`. The
|
|
32
|
-
* bridge host reads ITS own (first-party, unpartitioned) localStorage
|
|
33
|
-
* — which receives tokens from every product login via the deposit
|
|
34
|
-
* flow — and bounces them back to the original product origin via
|
|
35
|
-
* `/auth/sso-callback#sso=...`. On no central session the bridge
|
|
36
|
-
* bounces back with `?sso_failed=1` and `isAutoSSOSuppressed` keeps
|
|
37
|
-
* the user on the login screen.
|
|
38
|
-
*/
|
|
39
17
|
export declare function getSSORedirectUrl(returnPath?: string): string | null;
|
|
40
18
|
/**
|
|
41
19
|
* Check if Single Logout (SLO) has occurred on another shell.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SSORedirectGuard.d.ts","sourceRoot":"","sources":["../../../src/shared/components/SSORedirectGuard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAqGH,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAGlE;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAM1F;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAiBlF;
|
|
1
|
+
{"version":3,"file":"SSORedirectGuard.d.ts","sourceRoot":"","sources":["../../../src/shared/components/SSORedirectGuard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAqGH,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAGlE;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAM1F;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAiBlF;AAoDD,wBAAgB,iBAAiB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAsCpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CA6BlC;AAED;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAyC9F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CA6B1C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,4CAMjC"}
|
|
@@ -76,7 +76,16 @@ function y(e, t) {
|
|
|
76
76
|
sessionStorage.setItem(s, JSON.stringify(e));
|
|
77
77
|
} catch {}
|
|
78
78
|
}
|
|
79
|
-
function b(
|
|
79
|
+
function b() {
|
|
80
|
+
if (typeof window > "u") return !1;
|
|
81
|
+
try {
|
|
82
|
+
let e = window.Capacitor;
|
|
83
|
+
if (typeof e?.isNativePlatform == "function" && e.isNativePlatform()) return !0;
|
|
84
|
+
} catch {}
|
|
85
|
+
return !!(typeof navigator < "u" && /Electron/i.test(navigator.userAgent || ""));
|
|
86
|
+
}
|
|
87
|
+
function x(t) {
|
|
88
|
+
if (b()) return null;
|
|
80
89
|
try {
|
|
81
90
|
let n = u(t);
|
|
82
91
|
if (!n || p(n)) return null;
|
|
@@ -94,16 +103,16 @@ function b(t) {
|
|
|
94
103
|
return null;
|
|
95
104
|
}
|
|
96
105
|
}
|
|
97
|
-
function
|
|
106
|
+
function S() {
|
|
98
107
|
try {
|
|
99
108
|
if (a()) return !1;
|
|
100
109
|
let e = sessionStorage.getItem("bf-active-profile");
|
|
101
|
-
return !e || !localStorage.getItem(`bf-p-${e}-tokens`) || !r() ? !1 : (
|
|
110
|
+
return !e || !localStorage.getItem(`bf-p-${e}-tokens`) || !r() ? !1 : (w(), !0);
|
|
102
111
|
} catch {
|
|
103
112
|
return !1;
|
|
104
113
|
}
|
|
105
114
|
}
|
|
106
|
-
async function
|
|
115
|
+
async function C(e, t) {
|
|
107
116
|
try {
|
|
108
117
|
let n = await fetch(e, {
|
|
109
118
|
method: "POST",
|
|
@@ -120,7 +129,7 @@ async function S(e, t) {
|
|
|
120
129
|
return !1;
|
|
121
130
|
}
|
|
122
131
|
}
|
|
123
|
-
function
|
|
132
|
+
function w() {
|
|
124
133
|
try {
|
|
125
134
|
let e = localStorage.getItem("bf-profiles");
|
|
126
135
|
if (e) {
|
|
@@ -131,11 +140,11 @@ function C() {
|
|
|
131
140
|
localStorage.removeItem("bf-profiles"), localStorage.removeItem("auth-storage"), sessionStorage.removeItem("bf-active-profile"), t(), n(), window.dispatchEvent(new Event("bf-auth-state-cleared")), window.dispatchEvent(new Event("bf-profile-storage-change"));
|
|
132
141
|
} catch {}
|
|
133
142
|
}
|
|
134
|
-
function
|
|
143
|
+
function T() {
|
|
135
144
|
return /* @__PURE__ */ o("div", {
|
|
136
145
|
className: "flex items-center justify-center min-h-screen",
|
|
137
146
|
children: /* @__PURE__ */ o("div", { className: "animate-spin rounded-full h-8 w-8 border-2 border-action-primary-bg border-t-transparent" })
|
|
138
147
|
});
|
|
139
148
|
}
|
|
140
149
|
//#endregion
|
|
141
|
-
export {
|
|
150
|
+
export { T as SSORedirectSpinner, C as checkRemoteSLO, S as checkSLO, w as clearLocalAuthState, x as getSSORedirectUrl, v as hasRecentSSORedirectAttempt, y as markSSORedirectAttempt, _ as shouldSkipSSORedirect };
|