[PR #3446] [MERGED] feat(org): multi team support #21728

Closed
opened 2026-04-15 20:33:47 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3446
Author: @frectonz
Created: 7/18/2025
Status: Merged
Merged: 7/19/2025
Merged by: @Bekacru

Base: v1.3Head: feat/multi-team


📝 Commits (10+)

  • d9a925b docs: add logger option (#3171)
  • 6119db7 fix(mcp): issue with hardcoded baseURL in withMcpAuth (#2971)
  • 9c1293d fix(generic-oauth): error callback should avoid malformed URLs when the original URL already has query parameters (#3430)
  • 15452a5 fix: mysql foreign key constraints on generate (#2828)
  • 8792717 feat(social-providers): add Faceit Social Provider (#3140)
  • ea0fcda Revert "feat(social-providers): add Faceit Social Provider (#3140)" (#3432)
  • c27ff74 docs: callout on getSessionCookies on security check (#3110)
  • 8bcc352 docs: fix request lifecycle hooks example (#3434)
  • ce75d25 fix(stripe): allow upgrading incomplete subscriptions (#2930)
  • 4c9479e docs: automatic-tax-collection (#3415)

📊 Changes

22 files changed (+1535 additions, -151 deletions)

View changed files

📝 docs/content/docs/integrations/next.mdx (+8 -0)
📝 docs/content/docs/plugins/organization.mdx (+138 -8)
📝 docs/content/docs/plugins/stripe.mdx (+20 -1)
📝 docs/content/docs/reference/options.mdx (+61 -4)
📝 packages/better-auth/src/plugins/generic-oauth/index.ts (+7 -1)
📝 packages/better-auth/src/plugins/mcp/index.ts (+10 -3)
📝 packages/better-auth/src/plugins/organization/adapter.ts (+135 -6)
📝 packages/better-auth/src/plugins/organization/call.ts (+3 -1)
📝 packages/better-auth/src/plugins/organization/error-codes.ts (+8 -0)
📝 packages/better-auth/src/plugins/organization/organization.test.ts (+3 -1)
📝 packages/better-auth/src/plugins/organization/organization.ts (+120 -10)
📝 packages/better-auth/src/plugins/organization/routes/crud-invites.ts (+109 -64)
📝 packages/better-auth/src/plugins/organization/routes/crud-members.ts (+7 -1)
📝 packages/better-auth/src/plugins/organization/routes/crud-org.ts (+21 -2)
📝 packages/better-auth/src/plugins/organization/routes/crud-team.ts (+478 -1)
📝 packages/better-auth/src/plugins/organization/schema.ts (+9 -1)
📝 packages/better-auth/src/plugins/organization/team.test.ts (+331 -26)
📝 packages/better-auth/src/plugins/organization/types.ts (+15 -1)
📝 packages/better-auth/src/social-providers/social.test.ts (+6 -5)
📝 packages/better-auth/src/types/types.test.ts (+0 -1)

...and 2 more files

📄 Description

Summary by cubic

Added multi-team support to organizations, including setting an active team, listing user teams, and managing team membership.

  • New Features
    • Users can set or unset their active team.
    • Added endpoints to list all teams a user belongs to.
    • Team membership is now tracked and updated when accepting invitations.

🔄 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/3446 **Author:** [@frectonz](https://github.com/frectonz) **Created:** 7/18/2025 **Status:** ✅ Merged **Merged:** 7/19/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `v1.3` ← **Head:** `feat/multi-team` --- ### 📝 Commits (10+) - [`d9a925b`](https://github.com/better-auth/better-auth/commit/d9a925b3150fd7bd90922bb2dfc59f9f529368eb) docs: add logger option (#3171) - [`6119db7`](https://github.com/better-auth/better-auth/commit/6119db7a3dc010d6be05f0a329419b2eda4c1073) fix(mcp): issue with hardcoded baseURL in withMcpAuth (#2971) - [`9c1293d`](https://github.com/better-auth/better-auth/commit/9c1293de50613771197736445af4bc09ea9fb7bb) fix(generic-oauth): error callback should avoid malformed URLs when the original URL already has query parameters (#3430) - [`15452a5`](https://github.com/better-auth/better-auth/commit/15452a5402eb9c42d4225d9bd324cb11122b4799) fix: mysql foreign key constraints on generate (#2828) - [`8792717`](https://github.com/better-auth/better-auth/commit/8792717b4b17893a140cd932312ae8c577a24de0) feat(social-providers): add Faceit Social Provider (#3140) - [`ea0fcda`](https://github.com/better-auth/better-auth/commit/ea0fcdab70869ce11975b7867e21679c3d4d5acd) Revert "feat(social-providers): add Faceit Social Provider (#3140)" (#3432) - [`c27ff74`](https://github.com/better-auth/better-auth/commit/c27ff747ce18031edc561530464ccbe0e69aabb4) docs: callout on getSessionCookies on security check (#3110) - [`8bcc352`](https://github.com/better-auth/better-auth/commit/8bcc35285613fe9ef59f6bf3c93e30c9f5ec93fb) docs: fix request lifecycle hooks example (#3434) - [`ce75d25`](https://github.com/better-auth/better-auth/commit/ce75d25c4fd88acc1f8515f6b588252a630a2b3c) fix(stripe): allow upgrading incomplete subscriptions (#2930) - [`4c9479e`](https://github.com/better-auth/better-auth/commit/4c9479ee2bab2f6515f713a145418a9b1141cbe9) docs: automatic-tax-collection (#3415) ### 📊 Changes **22 files changed** (+1535 additions, -151 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/integrations/next.mdx` (+8 -0) 📝 `docs/content/docs/plugins/organization.mdx` (+138 -8) 📝 `docs/content/docs/plugins/stripe.mdx` (+20 -1) 📝 `docs/content/docs/reference/options.mdx` (+61 -4) 📝 `packages/better-auth/src/plugins/generic-oauth/index.ts` (+7 -1) 📝 `packages/better-auth/src/plugins/mcp/index.ts` (+10 -3) 📝 `packages/better-auth/src/plugins/organization/adapter.ts` (+135 -6) 📝 `packages/better-auth/src/plugins/organization/call.ts` (+3 -1) 📝 `packages/better-auth/src/plugins/organization/error-codes.ts` (+8 -0) 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+3 -1) 📝 `packages/better-auth/src/plugins/organization/organization.ts` (+120 -10) 📝 `packages/better-auth/src/plugins/organization/routes/crud-invites.ts` (+109 -64) 📝 `packages/better-auth/src/plugins/organization/routes/crud-members.ts` (+7 -1) 📝 `packages/better-auth/src/plugins/organization/routes/crud-org.ts` (+21 -2) 📝 `packages/better-auth/src/plugins/organization/routes/crud-team.ts` (+478 -1) 📝 `packages/better-auth/src/plugins/organization/schema.ts` (+9 -1) 📝 `packages/better-auth/src/plugins/organization/team.test.ts` (+331 -26) 📝 `packages/better-auth/src/plugins/organization/types.ts` (+15 -1) 📝 `packages/better-auth/src/social-providers/social.test.ts` (+6 -5) 📝 `packages/better-auth/src/types/types.test.ts` (+0 -1) _...and 2 more files_ </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Added multi-team support to organizations, including setting an active team, listing user teams, and managing team membership. - **New Features** - Users can set or unset their active team. - Added endpoints to list all teams a user belongs to. - Team membership is now tracked and updated when accepting invitations. <!-- 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 20:33:47 -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#21728