[PR #7843] [MERGED] feat(oauth-provider): export oAuthState for config use #24490

Closed
opened 2026-04-15 22:23:50 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7843
Author: @dvanmali
Created: 2/7/2026
Status: Merged
Merged: 2/7/2026
Merged by: @himself65

Base: canaryHead: opExportState


📝 Commits (1)

  • 6afa9f7 feat: export oAuthState for config use

📊 Changes

3 files changed (+7 additions, -1 deletions)

View changed files

📝 packages/oauth-provider/src/authorize.ts (+5 -0)
📝 packages/oauth-provider/src/index.ts (+1 -1)
📝 packages/oauth-provider/src/oauth.ts (+1 -0)

📄 Description

Export oAuthState via getOAuthProviderState for use within the auth config. This allows users to make flow decisions based on signed custom oauth_query authorize params.

Closes: #7630
Feature discussion: https://github.com/better-auth/better-auth/discussions/3505#discussioncomment-15728097


Summary by cubic

Expose request-scoped OAuth state to auth config by exporting getOAuthProviderState and setting it during /authorize, so apps can make flow decisions from signed oauth_query params.

  • New Features
    • Export getOAuthProviderState from the OAuth provider.
    • Store the authorize query (string) in request-scoped state during /authorize for use in config.

Written for commit 6afa9f7041. 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/7843 **Author:** [@dvanmali](https://github.com/dvanmali) **Created:** 2/7/2026 **Status:** ✅ Merged **Merged:** 2/7/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `opExportState` --- ### 📝 Commits (1) - [`6afa9f7`](https://github.com/better-auth/better-auth/commit/6afa9f7041b27f5fdb5967c4ecc6db23d084455e) feat: export oAuthState for config use ### 📊 Changes **3 files changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/oauth-provider/src/authorize.ts` (+5 -0) 📝 `packages/oauth-provider/src/index.ts` (+1 -1) 📝 `packages/oauth-provider/src/oauth.ts` (+1 -0) </details> ### 📄 Description Export oAuthState via `getOAuthProviderState` for use within the auth config. This allows users to make flow decisions based on signed custom `oauth_query` authorize params. Closes: #7630 Feature discussion: https://github.com/better-auth/better-auth/discussions/3505#discussioncomment-15728097 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Expose request-scoped OAuth state to auth config by exporting getOAuthProviderState and setting it during /authorize, so apps can make flow decisions from signed oauth_query params. - **New Features** - Export getOAuthProviderState from the OAuth provider. - Store the authorize query (string) in request-scoped state during /authorize for use in config. <sup>Written for commit 6afa9f7041b27f5fdb5967c4ecc6db23d084455e. 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-15 22:23:50 -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#24490