[PR #8013] [MERGED] fix(expo): support wildcard trusted origins in deep link cookie injection #33289

Closed
opened 2026-04-17 23:55:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8013
Author: @bytaesu
Created: 2/17/2026
Status: Merged
Merged: 2/18/2026
Merged by: @himself65

Base: canaryHead: 2026-02-17/fix/expo-wildcard


📝 Commits (1)

  • 72aa53c fix(expo): support wildcard trusted origins in deep link cookie injection

📊 Changes

2 files changed (+88 additions, -11 deletions)

View changed files

📝 packages/expo/src/index.ts (+15 -9)
📝 packages/expo/test/expo.test.ts (+73 -2)

📄 Description

Related to https://github.com/better-auth/better-auth/issues/6810#issuecomment-3910276678


Summary by cubic

Adds wildcard support for trusted origins in Expo deep link cookie injection and hardens redirect handling to only process app scheme links. Fixes cookie injection for patterns like myapp://* and prevents injection on http/https redirects.

  • Bug Fixes
    • Use ctx.context.isTrustedOrigin to correctly handle wildcard trustedOrigins.
    • Safely parse redirect URL; skip malformed and http/https redirects before injecting cookies.
    • Expand tests to cover wildcard origins and verify-email flows, asserting 302 and cookie in Location.

Written for commit 72aa53cf64. 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/8013 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 2/17/2026 **Status:** ✅ Merged **Merged:** 2/18/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `2026-02-17/fix/expo-wildcard` --- ### 📝 Commits (1) - [`72aa53c`](https://github.com/better-auth/better-auth/commit/72aa53cf64858a030c44e227ccc65f30a973a460) fix(expo): support wildcard trusted origins in deep link cookie injection ### 📊 Changes **2 files changed** (+88 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `packages/expo/src/index.ts` (+15 -9) 📝 `packages/expo/test/expo.test.ts` (+73 -2) </details> ### 📄 Description Related to https://github.com/better-auth/better-auth/issues/6810#issuecomment-3910276678 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds wildcard support for trusted origins in Expo deep link cookie injection and hardens redirect handling to only process app scheme links. Fixes cookie injection for patterns like myapp://* and prevents injection on http/https redirects. - **Bug Fixes** - Use ctx.context.isTrustedOrigin to correctly handle wildcard trustedOrigins. - Safely parse redirect URL; skip malformed and http/https redirects before injecting cookies. - Expand tests to cover wildcard origins and verify-email flows, asserting 302 and cookie in Location. <sup>Written for commit 72aa53cf64858a030c44e227ccc65f30a973a460. 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-04-17 23:55: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#33289