[PR #6278] [CLOSED] set default to cookie to match JSDoc #6562

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6278
Author: @van-sprundel
Created: 11/24/2025
Status: Closed

Base: canaryHead: change-default-oauth-store-strategy


📝 Commits (2)

  • fe1175a set default to cookie to match JSDoc
  • 5390502 Merge branch 'canary' into change-default-oauth-store-strategy

📊 Changes

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

View changed files

📝 packages/better-auth/src/context/create-context.ts (+1 -1)

📄 Description

Would fix https://github.com/better-auth/better-auth/issues/5034 since after "1.3.13" this was broken for people (see my last comment)

Pre "1.3.13" it was essentially cookie-based, so this would be similar. Users who want the added security of database storage can still explicitly set storeStateStrategy: "database" and use skipStateCookieCheck: true if cookies are unreliable in their environment.

I'm not sure what the team thinks so let me know if this is desired or not


Summary by cubic

Restore oauthConfig.storeStateStrategy default to "cookie" to match the JSDoc and previous behavior. This fixes a regression after 1.3.13 that broke OAuth state handling for apps not setting this option.

  • Bug Fixes
    • Default storeStateStrategy is now "cookie" when not provided.
    • Aligns runtime with docs and prevents state mismatches during sign-in.

Written for commit 5390502fe1. 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/6278 **Author:** [@van-sprundel](https://github.com/van-sprundel) **Created:** 11/24/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `change-default-oauth-store-strategy` --- ### 📝 Commits (2) - [`fe1175a`](https://github.com/better-auth/better-auth/commit/fe1175a72b557f3effccd41b54befc97ca1823c6) set default to cookie to match JSDoc - [`5390502`](https://github.com/better-auth/better-auth/commit/5390502fe1b0a2e19a15ef79d55c26fdff71b028) Merge branch 'canary' into change-default-oauth-store-strategy ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/context/create-context.ts` (+1 -1) </details> ### 📄 Description Would fix https://github.com/better-auth/better-auth/issues/5034 since after "1.3.13" this was broken for people (see my last comment) Pre "1.3.13" it was essentially cookie-based, so this would be similar. Users who want the added security of database storage can still explicitly set storeStateStrategy: "database" and use skipStateCookieCheck: true if cookies are unreliable in their environment. I'm not sure what the team thinks so let me know if this is desired or not <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Restore oauthConfig.storeStateStrategy default to "cookie" to match the JSDoc and previous behavior. This fixes a regression after 1.3.13 that broke OAuth state handling for apps not setting this option. - **Bug Fixes** - Default storeStateStrategy is now "cookie" when not provided. - Aligns runtime with docs and prevents state mismatches during sign-in. <sup>Written for commit 5390502fe1b0a2e19a15ef79d55c26fdff71b028. 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 13:03:25 -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#6562