[PR #6449] [CLOSED] fix: consistent prefix delimiter for session_token cookie #23572

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6449
Author: @jslno
Created: 12/1/2025
Status: Closed

Base: canaryHead: 12-01-2025/fix-cookie-name-construction


📝 Commits (1)

  • f6170d9 fix: consistent session token cookie delimiter

📊 Changes

1 file changed (+2 additions, -12 deletions)

View changed files

📝 packages/better-auth/src/cookies/index.ts (+2 -12)

📄 Description

closes #6435


Summary by cubic

Standardized the session token cookie name to always use a dot delimiter between prefix and name, ensuring consistent parsing and secure cookie lookup across environments.

  • Bug Fixes
    • Default prefix is "better-auth" and the cookie name is built as "better-auth.session_token".
    • Removed conditional delimiter logic so the prefix format is consistent.

Written for commit f6170d9832. Summary will update automatically on new commits.


🔄 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/6449 **Author:** [@jslno](https://github.com/jslno) **Created:** 12/1/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `12-01-2025/fix-cookie-name-construction` --- ### 📝 Commits (1) - [`f6170d9`](https://github.com/better-auth/better-auth/commit/f6170d983243815a65a0fc841ea9f76b39ea8f9a) fix: consistent session token cookie delimiter ### 📊 Changes **1 file changed** (+2 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/cookies/index.ts` (+2 -12) </details> ### 📄 Description closes #6435 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Standardized the session token cookie name to always use a dot delimiter between prefix and name, ensuring consistent parsing and secure cookie lookup across environments. - **Bug Fixes** - Default prefix is "better-auth" and the cookie name is built as "better-auth.session_token". - Removed conditional delimiter logic so the prefix format is consistent. <sup>Written for commit f6170d983243815a65a0fc841ea9f76b39ea8f9a. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <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:50:08 -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#23572