[PR #3486] [MERGED] fix(org): inferAuth with multiple plugins #4852

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3486
Author: @ping-maxwell
Created: 7/19/2025
Status: Merged
Merged: 7/19/2025
Merged by: @Bekacru

Base: mainHead: fix/org/infer-auth-with-multiple-plugins


📝 Commits (1)

  • 9d466c2 fix(org): inferAuth with multiple plugins

📊 Changes

2 files changed (+37 additions, -10 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/client.ts (+17 -8)
📝 packages/better-auth/src/plugins/organization/organization.test.ts (+20 -2)

📄 Description

It didn't infer the org plugin when there was multiple plugins in the plugins array, this is now fixed.


Summary by cubic

Fixed organization schema inference when multiple plugins are present in the plugins array.

  • Bug Fixes
    • Updated type logic to correctly find and infer the organization plugin schema even if other plugins are included.
    • Added tests to confirm schema inference works with multiple plugins.

🔄 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/3486 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 7/19/2025 **Status:** ✅ Merged **Merged:** 7/19/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/org/infer-auth-with-multiple-plugins` --- ### 📝 Commits (1) - [`9d466c2`](https://github.com/better-auth/better-auth/commit/9d466c27ca40e0176128632a81abc24101848f3b) fix(org): inferAuth with multiple plugins ### 📊 Changes **2 files changed** (+37 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/client.ts` (+17 -8) 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+20 -2) </details> ### 📄 Description It didn't infer the org plugin when there was multiple plugins in the plugins array, this is now fixed. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixed organization schema inference when multiple plugins are present in the plugins array. - **Bug Fixes** - Updated type logic to correctly find and infer the organization plugin schema even if other plugins are included. - Added tests to confirm schema inference works with multiple plugins. <!-- 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 12:02:05 -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#4852