[PR #3284] [MERGED] fix: import setCookie from tanstack start core package #4735

Closed
opened 2026-03-13 11:58:01 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3284
Author: @asterikx
Created: 7/7/2025
Status: Merged
Merged: 7/7/2025
Merged by: @Bekacru

Base: mainHead: fix/tanstack-start-cookies


📝 Commits (1)

  • 5c5ef02 fix: import setCookie from tanstack start core package

📊 Changes

1 file changed (+1 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/integrations/react-start.ts (+1 -3)

📄 Description

This PR enables to use the Tanstack Start integration with both the React and the Solid flavor of Tanstack Start.

Previously, the setCookie method was imported from @tanstack/react-start which is typically not installed in projects using the Solid flavor.
By importing setCookie from the core package @tanstack/start-server-core, this integration works regardless of whether @tanstack/react-start or @tanstack/solid-start is used.
The framework-specific packages re-export thesetCookie method from the core package (here) without modification.


🔄 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/3284 **Author:** [@asterikx](https://github.com/asterikx) **Created:** 7/7/2025 **Status:** ✅ Merged **Merged:** 7/7/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/tanstack-start-cookies` --- ### 📝 Commits (1) - [`5c5ef02`](https://github.com/better-auth/better-auth/commit/5c5ef025f5fc29207b3a7252f8ab135b0ead073f) fix: import setCookie from tanstack start core package ### 📊 Changes **1 file changed** (+1 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/integrations/react-start.ts` (+1 -3) </details> ### 📄 Description This PR enables to use the Tanstack Start integration with both the React and the Solid flavor of Tanstack Start. Previously, the `setCookie` method was imported from `@tanstack/react-start` which is typically not installed in projects using the Solid flavor. By importing `setCookie` from the core package `@tanstack/start-server-core`, this integration works regardless of whether `@tanstack/react-start` or `@tanstack/solid-start` is used. The framework-specific packages re-export the`setCookie` method from the core package ([here](https://github.com/TanStack/router/blob/b01a349583d92c9a8e21024bc9dcceb71ab08244/packages/react-start-server/src/index.tsx#L4)) without modification. --- <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-03-13 11:58:01 -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#4735