stack/apps/e2e/tests/js
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
..
access-token-refresh.test.ts rename signed_up_at_millis JWT claim to signed_up_at 2026-03-30 17:43:06 -07:00
api-keys.test.ts fix tests (#922) 2025-10-03 11:10:35 -07:00
app.test.ts Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
auth-like.test.ts Fix tests 2026-02-17 20:53:03 -08:00
config.test.ts Queries view (#1145) 2026-02-16 11:39:21 -08:00
connected-accounts.test.ts More connected accounts (#1165) 2026-02-18 15:19:35 -08:00
convex.test.ts Onboarding app & restricted users (#1069) 2026-01-11 17:22:14 -08:00
cookies.test.ts Fix cross-subdomain cookie deletion and prefetch trusted parent domain (#1302) 2026-04-03 17:10:25 -07:00
cross-domain-auth.test.ts New { type: "hosted" } for page URLs (#1261) 2026-03-27 14:48:01 -07:00
data-vault.test.ts Data vaults (#871) 2025-08-30 23:42:56 -07:00
email-template-existing-project.test.ts Emails redesign (#1076) 2026-02-16 14:57:17 -08:00
email.test.ts [Refactor][Feat][Fix] Rework Email Section With New Sent Page, Better Drafts Page, and Settings Page (#1221) 2026-03-11 12:01:36 -07:00
inheritance.test.ts fix default redirect method (#1253) 2026-03-31 15:08:33 -07:00
js-helpers.ts fix default redirect method (#1253) 2026-03-31 15:08:33 -07:00
list-users.test.ts Add server-side flags for anonymous users 2026-04-03 10:43:34 -07:00
oauth-providers.test.ts OAuth provider client and dashboard (#792) 2025-09-10 10:48:19 +02:00
oauth.test.ts Turnstile integration for fraud protection (#1239) 2026-03-20 21:26:45 +00:00
payments.test.ts fix product route access (#1134) 2026-01-27 18:30:14 +00:00
restricted-users.test.ts Onboarding app & restricted users (#1069) 2026-01-11 17:22:14 -08:00
team-invitations.test.ts Fix tests 2026-02-17 19:57:08 -08:00