@orangecheck/auth-client 2.11.0 → 2.12.0
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/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -84,7 +84,13 @@ function OcSessionProvider({
|
|
|
84
84
|
try {
|
|
85
85
|
await fetch(`${cfg.authOrigin}${cfg.logoutPath}`, {
|
|
86
86
|
method: "POST",
|
|
87
|
-
credentials: "include"
|
|
87
|
+
credentials: "include",
|
|
88
|
+
// `keepalive` lets the logout round-trip complete even if
|
|
89
|
+
// the caller hard-navigates away in the same tick (e.g.
|
|
90
|
+
// `<OcAccountMenu>` redirects home immediately on sign-out).
|
|
91
|
+
// Without it the in-flight request is cancelled on unload
|
|
92
|
+
// and the `.ochk.io` cookie may never get cleared.
|
|
93
|
+
keepalive: true
|
|
88
94
|
});
|
|
89
95
|
} catch {
|
|
90
96
|
}
|