[PR #6074] [MERGED] fix(expo): enhance cookie detection for better-auth cookies #6426

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6074
Author: @himself65
Created: 11/18/2025
Status: Merged
Merged: 11/18/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/11/18/cookie


📝 Commits (1)

  • ab44dae fix(auth): enhance cookie detection for better-auth cookies

📊 Changes

2 files changed (+31 additions, -20 deletions)

View changed files

📝 packages/expo/src/client.ts (+17 -19)
📝 packages/expo/test/expo.test.ts (+14 -1)

📄 Description

Summary by cubic

Expanded better-auth cookie detection to include non-session cookies (e.g., passkey) so auth changes are caught reliably while still ignoring third‑party cookies.

  • Bug Fixes
    • Detect any cookie starting with the configured prefix (handles "__Secure-" variants).
    • Keep suffix matching when prefix is empty (session_token, session_data).
    • Add tests for passkey cookies, secure passkey, and custom prefixed names.

Written for commit ab44dae245. 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/6074 **Author:** [@himself65](https://github.com/himself65) **Created:** 11/18/2025 **Status:** ✅ Merged **Merged:** 11/18/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/11/18/cookie` --- ### 📝 Commits (1) - [`ab44dae`](https://github.com/better-auth/better-auth/commit/ab44dae245e60b03a4b98104e8e9b165d26c2c9b) fix(auth): enhance cookie detection for better-auth cookies ### 📊 Changes **2 files changed** (+31 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `packages/expo/src/client.ts` (+17 -19) 📝 `packages/expo/test/expo.test.ts` (+14 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Expanded better-auth cookie detection to include non-session cookies (e.g., passkey) so auth changes are caught reliably while still ignoring third‑party cookies. - **Bug Fixes** - Detect any cookie starting with the configured prefix (handles "__Secure-" variants). - Keep suffix matching when prefix is empty (session_token, session_data). - Add tests for passkey cookies, secure passkey, and custom prefixed names. <sup>Written for commit ab44dae245e60b03a4b98104e8e9b165d26c2c9b. 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-03-13 12:58:59 -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#6426