[PR #5748] [MERGED] fix(cookie): sameSite to "none" for oauth state #6197

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

📋 Pull Request Information

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

Base: canaryHead: himself65/2025/11/03/apple-login


📝 Commits (7)

📊 Changes

4 files changed (+13 additions, -4 deletions)

View changed files

📝 demo/nextjs/lib/auth.ts (+1 -1)
📝 demo/nextjs/turbo.json (+3 -1)
📝 packages/better-auth/src/oauth2/state.ts (+8 -2)
📝 packages/expo/src/index.ts (+1 -0)

📄 Description

Related: https://github.com/nextauthjs/next-auth/discussions/5879
Fixes: https://github.com/better-auth/better-auth/issues/5227
Fixes: https://github.com/better-auth/better-auth/issues/5243

Apple provider is using form_post behavior, so the cookie from "Lax" will be ignored.


🔄 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/5748 **Author:** [@himself65](https://github.com/himself65) **Created:** 11/4/2025 **Status:** ✅ Merged **Merged:** 11/4/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/11/03/apple-login` --- ### 📝 Commits (7) - [`241b2ad`](https://github.com/better-auth/better-auth/commit/241b2ad725c98bb60e358f36ffaef29c6bd6cc68) chore(demo): fix apple login - [`cef7872`](https://github.com/better-auth/better-auth/commit/cef7872a1843d4cfbe3f8a157f59044e844865f6) fix: use none for https - [`ceca301`](https://github.com/better-auth/better-auth/commit/ceca301cb22dec577cede4d3f32fa4bfb00d631d) test: fix - [`66a28e7`](https://github.com/better-auth/better-auth/commit/66a28e790d0a2945d287bf4428b25aafd8615475) chore: fix turbo.json - [`d7d6ae1`](https://github.com/better-auth/better-auth/commit/d7d6ae10b3963bcfb9fe2f613296a416d9d0fc0d) None - [`216c377`](https://github.com/better-auth/better-auth/commit/216c3779603bb06d76d14519bca626c7a1c0ce64) fix: oauth_state only - [`8280140`](https://github.com/better-auth/better-auth/commit/82801407fb16337a711adccee92357407219a95a) fix: same site none only for state ### 📊 Changes **4 files changed** (+13 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `demo/nextjs/lib/auth.ts` (+1 -1) 📝 `demo/nextjs/turbo.json` (+3 -1) 📝 `packages/better-auth/src/oauth2/state.ts` (+8 -2) 📝 `packages/expo/src/index.ts` (+1 -0) </details> ### 📄 Description Related: https://github.com/nextauthjs/next-auth/discussions/5879 Fixes: https://github.com/better-auth/better-auth/issues/5227 Fixes: https://github.com/better-auth/better-auth/issues/5243 Apple provider is using `form_post` behavior, so the cookie from "Lax" will be ignored. --- <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:50:43 -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#6197