You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stale host-only auth cookies survive a Domain migration and shadow the new session #308
After you switch cookieOptions.domain from unset (host-only) to a parent domain such as .example.com, the browser keeps the old host-only auth cookies until sign-out. They shadow the new domain-scoped cookies, so the client reads the old session.
#240 added a host-only clear when domain is set, but setItem and applyServerStorage only emit it for chunks they remove. Chunks that are overwritten keep the same names (sb-<ref>-auth-token.0, .1, ...), so they never get a host-only clear. After the first write with the new domain, the browser holds two cookies per name:
the old host-only cookie (Domain not set)
the new cookie with Domain=.example.com
Browsers list the older cookie first in document.cookie and the Cookie header, and cookie.parse keeps the first value for a name:
Activity