@the-portland-company/shell 0.36.2 → 0.36.3
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/app-chrome.cjs +10 -8
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.d.cts +8 -1
- package/dist/app-chrome.d.ts +8 -1
- package/dist/app-chrome.js +10 -8
- package/dist/app-chrome.js.map +1 -1
- package/package.json +1 -1
package/dist/app-chrome.cjs
CHANGED
|
@@ -2688,6 +2688,7 @@ function watchLogout(onLogout, options = {}) {
|
|
|
2688
2688
|
return cleanup;
|
|
2689
2689
|
}
|
|
2690
2690
|
var CORE_APP = "vrm";
|
|
2691
|
+
var DEFAULT_SIGN_OUT_URL = "/auth/signout";
|
|
2691
2692
|
var POLITOGY_APPS = {
|
|
2692
2693
|
vrm: { title: "Politogy VRM", origin: "https://app.politogyvrm.com", storagePrefix: "vrm" },
|
|
2693
2694
|
contacts: { title: "Contacts", origin: "https://contacts.politogyvrm.com", storagePrefix: "contacts" },
|
|
@@ -2715,6 +2716,7 @@ function PolitogyAppFrame({
|
|
|
2715
2716
|
linkComponent,
|
|
2716
2717
|
session,
|
|
2717
2718
|
onSignOut,
|
|
2719
|
+
signOutUrl = DEFAULT_SIGN_OUT_URL,
|
|
2718
2720
|
buildMeta,
|
|
2719
2721
|
data,
|
|
2720
2722
|
children
|
|
@@ -2742,6 +2744,7 @@ function PolitogyAppFrame({
|
|
|
2742
2744
|
linkComponent,
|
|
2743
2745
|
session,
|
|
2744
2746
|
onSignOut,
|
|
2747
|
+
signOutUrl,
|
|
2745
2748
|
buildMeta,
|
|
2746
2749
|
data,
|
|
2747
2750
|
children
|
|
@@ -2757,6 +2760,7 @@ function FrameBody({
|
|
|
2757
2760
|
linkComponent,
|
|
2758
2761
|
session,
|
|
2759
2762
|
onSignOut,
|
|
2763
|
+
signOutUrl,
|
|
2760
2764
|
buildMeta,
|
|
2761
2765
|
data,
|
|
2762
2766
|
children
|
|
@@ -2770,14 +2774,12 @@ function FrameBody({
|
|
|
2770
2774
|
signingOutRef.current = true;
|
|
2771
2775
|
broadcastLogout();
|
|
2772
2776
|
signOutRef.current();
|
|
2773
|
-
window.
|
|
2774
|
-
|
|
2775
|
-
}, 2e3);
|
|
2776
|
-
}, []);
|
|
2777
|
+
window.location.assign(signOutUrl);
|
|
2778
|
+
}, [signOutUrl]);
|
|
2777
2779
|
react.useEffect(
|
|
2778
2780
|
() => (
|
|
2779
|
-
// A tab that learns of a sign-out elsewhere
|
|
2780
|
-
//
|
|
2781
|
+
// A tab that learns of a sign-out elsewhere ends its own session for
|
|
2782
|
+
// real, by navigating to the same sign-out route.
|
|
2781
2783
|
//
|
|
2782
2784
|
// Measured against production before this landed: calling the app's
|
|
2783
2785
|
// handler did nothing at all. Apps wire it as
|
|
@@ -2794,10 +2796,10 @@ function FrameBody({
|
|
|
2794
2796
|
// already on record for every tab.
|
|
2795
2797
|
watchLogout(() => {
|
|
2796
2798
|
if (signingOutRef.current) return;
|
|
2797
|
-
window.location.
|
|
2799
|
+
window.location.assign(signOutUrl);
|
|
2798
2800
|
})
|
|
2799
2801
|
),
|
|
2800
|
-
[]
|
|
2802
|
+
[signOutUrl]
|
|
2801
2803
|
);
|
|
2802
2804
|
const core = app === CORE_APP ? data?.core : void 0;
|
|
2803
2805
|
const identity = useChromeIdentity({ userName: session.userName, email: session.email });
|