@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 CHANGED
@@ -106,7 +106,13 @@ function OcSessionProvider({
106
106
  try {
107
107
  await fetch(`${cfg.authOrigin}${cfg.logoutPath}`, {
108
108
  method: "POST",
109
- credentials: "include"
109
+ credentials: "include",
110
+ // `keepalive` lets the logout round-trip complete even if
111
+ // the caller hard-navigates away in the same tick (e.g.
112
+ // `<OcAccountMenu>` redirects home immediately on sign-out).
113
+ // Without it the in-flight request is cancelled on unload
114
+ // and the `.ochk.io` cookie may never get cleared.
115
+ keepalive: true
110
116
  });
111
117
  } catch {
112
118
  }