[PR #4603] [CLOSED] Revert "feat: support cross-domain cookie (#4482)" #22378

Closed
opened 2026-04-15 21:00:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4603
Author: @himself65
Created: 9/12/2025
Status: Closed

Base: canaryHead: himself65/2025/09/12/cross-domain


📝 Commits (1)

  • 7c51e96 Revert "feat: support cross-domain cookie (#4482)"

📊 Changes

11 files changed (+55 additions, -476 deletions)

View changed files

📝 docs/content/docs/concepts/cookies.mdx (+8 -86)
📝 e2e/integration/vanilla-node/e2e/app.ts (+0 -47)
📝 e2e/integration/vanilla-node/e2e/domain.spec.ts (+6 -29)
e2e/integration/vanilla-node/e2e/fixtures/certificate.pem (+0 -19)
e2e/integration/vanilla-node/e2e/fixtures/private-key.pem (+0 -28)
📝 e2e/integration/vanilla-node/e2e/utils.ts (+6 -14)
📝 e2e/integration/vanilla-node/src/main.ts (+1 -2)
📝 e2e/integration/vanilla-node/vite.config.ts (+0 -7)
📝 packages/better-auth/src/cookies/cookies.test.ts (+2 -141)
📝 packages/better-auth/src/cookies/index.ts (+19 -66)
📝 packages/better-auth/src/types/options.ts (+13 -37)

📄 Description

The issue here:

  1. partitioned only works for some versions of Chrome, and it's not supported by any other browser. 3rd-party domain cookies are blocked from all modern browsers
  2. Imaging there are two servers on vercel.app and render.com, even render.com could set the cookie on vercel.app, but the Next.js server on vercel.app still cannot access the cookie. So this will lead server-side rendering issue. I thought e2e covers this, but it's not; it's okay for just a SPA app
  3. api is confusing; the docs and examples might mislead people.

This reverts commit 61b6a87435.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4603 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/12/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `himself65/2025/09/12/cross-domain` --- ### 📝 Commits (1) - [`7c51e96`](https://github.com/better-auth/better-auth/commit/7c51e96d4aa9c4ddfd846b14f46dcdff78d59221) Revert "feat: support cross-domain cookie (#4482)" ### 📊 Changes **11 files changed** (+55 additions, -476 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/concepts/cookies.mdx` (+8 -86) 📝 `e2e/integration/vanilla-node/e2e/app.ts` (+0 -47) 📝 `e2e/integration/vanilla-node/e2e/domain.spec.ts` (+6 -29) ➖ `e2e/integration/vanilla-node/e2e/fixtures/certificate.pem` (+0 -19) ➖ `e2e/integration/vanilla-node/e2e/fixtures/private-key.pem` (+0 -28) 📝 `e2e/integration/vanilla-node/e2e/utils.ts` (+6 -14) 📝 `e2e/integration/vanilla-node/src/main.ts` (+1 -2) 📝 `e2e/integration/vanilla-node/vite.config.ts` (+0 -7) 📝 `packages/better-auth/src/cookies/cookies.test.ts` (+2 -141) 📝 `packages/better-auth/src/cookies/index.ts` (+19 -66) 📝 `packages/better-auth/src/types/options.ts` (+13 -37) </details> ### 📄 Description The issue here: 1. `partitioned` only works for some versions of Chrome, and it's not supported by any other browser. 3rd-party domain cookies are blocked from all modern browsers 2. Imaging there are two servers on vercel.app and render.com, even render.com could set the cookie on vercel.app, but the Next.js server on vercel.app still cannot access the cookie. So this will lead server-side rendering issue. I thought e2e covers this, but it's not; it's okay for just a SPA app 3. api is confusing; the docs and examples might mislead people. This reverts commit 61b6a874354cf080d4b6812c62346ae235b4c986. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 21:00:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#22378