[PR #8090] [MERGED] fix(expo): delete expired cookies instead of storing empty values #7739

Closed
opened 2026-03-13 13:47:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8090
Author: @bytaesu
Created: 2/21/2026
Status: Merged
Merged: 2/21/2026
Merged by: @bytaesu

Base: canaryHead: 2026-02-21/fix/expo-cookie-cleanup


📝 Commits (1)

  • 81146aa fix(expo): delete expired cookies instead of storing empty values

📊 Changes

2 files changed (+37 additions, -13 deletions)

View changed files

📝 packages/expo/src/client.ts (+11 -13)
📝 packages/expo/test/expo.test.ts (+26 -0)

📄 Description

Related to https://github.com/better-auth/better-auth/issues/2493#issuecomment-3923701935


Summary by cubic

Delete expired cookies in the Expo client instead of storing blank values. This prevents stale auth state and avoids sending empty Cookie headers.

  • Bug Fixes
    • Remove cookies when Max-Age ≤ 0 or Expires is in the past.
    • Only attach the Cookie header if a cookie string exists.

Written for commit 81146aa09e. Summary will update 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/8090 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 2/21/2026 **Status:** ✅ Merged **Merged:** 2/21/2026 **Merged by:** [@bytaesu](https://github.com/bytaesu) **Base:** `canary` ← **Head:** `2026-02-21/fix/expo-cookie-cleanup` --- ### 📝 Commits (1) - [`81146aa`](https://github.com/better-auth/better-auth/commit/81146aa09e1f73477b0b0623d3375486a0020703) fix(expo): delete expired cookies instead of storing empty values ### 📊 Changes **2 files changed** (+37 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `packages/expo/src/client.ts` (+11 -13) 📝 `packages/expo/test/expo.test.ts` (+26 -0) </details> ### 📄 Description - Closes #2493 Related to https://github.com/better-auth/better-auth/issues/2493#issuecomment-3923701935 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Delete expired cookies in the Expo client instead of storing blank values. This prevents stale auth state and avoids sending empty Cookie headers. - **Bug Fixes** - Remove cookies when Max-Age ≤ 0 or Expires is in the past. - Only attach the Cookie header if a cookie string exists. <sup>Written for commit 81146aa09e1f73477b0b0623d3375486a0020703. Summary will update 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-03-13 13:47:46 -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#7739