stack/packages
BilalG1 e2fbe2ca09
Fix cross-subdomain cookie deletion and prefetch trusted parent domain (#1302)
Cross-subdomain refresh cookies were not being deleted correctly because
the domain option was not passed to deleteCookie/deleteCookieClient.
This caused stale cookies to accumulate and auth state to persist across
subdomains after sign-out.

Also eagerly warms the trusted parent domain cache on app construction
to avoid a race condition where navigation after sign-in could prevent
the cross-subdomain cookie from being written.

<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Automatically recreates a missing cross-subdomain refresh cookie on
app startup in browser sessions when applicable.

* **Bug Fixes**
* Cookie deletions now correctly scope removals to the encoded parent
domain when applicable for both browser and server token-store flows.

* **Performance**
* Pre-warms a domain-resolution cache in browser token-store scenarios
to reduce authentication latency.

* **Tests**
* Added end-to-end tests validating custom refresh-cookie name
encoding/decoding, non-custom cookie handling, and eager cookie
recreation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-03 17:10:25 -07:00
..
dashboard-ui-components chore: update package versions 2026-03-31 10:54:12 -07:00
init-stack chore: update package versions 2026-03-31 10:54:12 -07:00
js chore: update package versions 2026-03-31 10:54:12 -07:00
react chore: update package versions 2026-03-31 10:54:12 -07:00
stack chore: update package versions 2026-03-31 10:54:12 -07:00
stack-cli chore: update package versions 2026-03-31 10:54:12 -07:00
stack-sc chore: update package versions 2026-03-31 10:54:12 -07:00
stack-shared Add server-side flags for anonymous users 2026-04-03 10:43:34 -07:00
stack-ui chore: update package versions 2026-03-31 10:54:12 -07:00
template Fix cross-subdomain cookie deletion and prefetch trusted parent domain (#1302) 2026-04-03 17:10:25 -07:00