[PR #6858] [MERGED] chore: pass options to plugin configurations #15174

Closed
opened 2026-04-13 09:52:07 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6858
Author: @jslno
Created: 12/18/2025
Status: Merged
Merged: 12/19/2025
Merged by: @himself65

Base: canaryHead: 12-18-2025/missing-opts-in-plugin-config


📝 Commits (4)

  • 0e54bdf chore: pass options to plugin configurations
  • 3ff0dbc chore: fix linting
  • 4724d8d chore: export plugin options type
  • 9cf366d chore(device-authorization): re-export neccessary types

📊 Changes

24 files changed (+28 additions, -3 deletions)

View changed files

📝 packages/better-auth/src/plugins/anonymous/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/bearer/index.ts (+2 -1)
📝 packages/better-auth/src/plugins/captcha/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/custom-session/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/device-authorization/index.ts (+3 -0)
📝 packages/better-auth/src/plugins/email-otp/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/generic-oauth/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/haveibeenpwned/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/last-login-method/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/magic-link/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/mcp/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/multi-session/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/one-tap/index.ts (+2 -1)
📝 packages/better-auth/src/plugins/one-time-token/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/open-api/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/organization/organization.ts (+1 -1)
📝 packages/better-auth/src/plugins/phone-number/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/siwe/index.ts (+1 -0)
📝 packages/better-auth/src/plugins/username/index.ts (+1 -0)
📝 packages/expo/src/index.ts (+1 -0)

...and 4 more files

📄 Description

Summary by cubic

Expose plugin options on all BetterAuth plugins so configurations, endpoints, and schema builders can read the original user options. Unifies the plugin shape and improves type safety without changing behavior.

  • New Features
    • Added plugin.options to all plugins’ returned BetterAuthPlugin objects.
    • Improved typing (NoInfer) and exported BearerOptions and OneTapOptions.
    • Re-exported time utility types from device-authorization.
    • Additive change only; no runtime behavior changes.

Written for commit 9cf366d0c8. 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/6858 **Author:** [@jslno](https://github.com/jslno) **Created:** 12/18/2025 **Status:** ✅ Merged **Merged:** 12/19/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `12-18-2025/missing-opts-in-plugin-config` --- ### 📝 Commits (4) - [`0e54bdf`](https://github.com/better-auth/better-auth/commit/0e54bdfa4c935e50184d004f960cc4a452f70285) chore: pass options to plugin configurations - [`3ff0dbc`](https://github.com/better-auth/better-auth/commit/3ff0dbcdf3e781dafc8bf5e49d89db2188c4aea9) chore: fix linting - [`4724d8d`](https://github.com/better-auth/better-auth/commit/4724d8d0da88ad366f65ebcd70d16d1e052778f4) chore: export plugin options type - [`9cf366d`](https://github.com/better-auth/better-auth/commit/9cf366d0c848c0d8e5b7d1f023d383376d29b45d) chore(device-authorization): re-export neccessary types ### 📊 Changes **24 files changed** (+28 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/anonymous/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/bearer/index.ts` (+2 -1) 📝 `packages/better-auth/src/plugins/captcha/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/custom-session/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/device-authorization/index.ts` (+3 -0) 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/generic-oauth/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/haveibeenpwned/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/last-login-method/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/magic-link/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/mcp/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/multi-session/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/one-tap/index.ts` (+2 -1) 📝 `packages/better-auth/src/plugins/one-time-token/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/open-api/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/organization/organization.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/phone-number/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/siwe/index.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/username/index.ts` (+1 -0) 📝 `packages/expo/src/index.ts` (+1 -0) _...and 4 more files_ </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Expose plugin options on all BetterAuth plugins so configurations, endpoints, and schema builders can read the original user options. Unifies the plugin shape and improves type safety without changing behavior. - **New Features** - Added plugin.options to all plugins’ returned BetterAuthPlugin objects. - Improved typing (NoInfer) and exported BearerOptions and OneTapOptions. - Re-exported time utility types from device-authorization. - Additive change only; no runtime behavior changes. <sup>Written for commit 9cf366d0c848c0d8e5b7d1f023d383376d29b45d. 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-04-13 09:52:07 -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#15174