[PR #3825] [CLOSED] fix: add missing team reference in teamMember schema #5028

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3825
Author: @Kinfe123
Created: 8/6/2025
Status: Closed

Base: canaryHead: fix/team-id-reference-map


📝 Commits (9)

  • 5dfae1f fix(org): use correct slug lookup when setting active org
  • 29f7961 docs: adding reference to surrealdb adapter rewrite (#3754)
  • 97cdff4 chore(demo): replace isLoading using useTransition (#3775)
  • cb017be fix(reddit): refresh access token should use basic auth (#3753)
  • 5876cb4 fix: add missing team reference in teamMember schema #3801
  • 165c437 test update
  • efdbfeb update
  • b9dfa60 update
  • 9eb4a83 chore: remove changeset

📊 Changes

12 files changed (+163 additions, -117 deletions)

View changed files

📝 demo/nextjs/app/client-test/page.tsx (+19 -21)
📝 demo/nextjs/app/dashboard/user-card.tsx (+21 -19)
📝 demo/nextjs/components/sign-in.tsx (+11 -11)
📝 docs/app/docs/[[...slug]]/page.client.tsx (+5 -8)
📝 docs/components/generate-apple-jwt.tsx (+45 -42)
📝 docs/content/docs/adapters/community-adapters.mdx (+1 -0)
📝 packages/better-auth/src/plugins/organization/adapter.ts (+10 -0)
📝 packages/better-auth/src/plugins/organization/organization.test.ts (+19 -5)
📝 packages/better-auth/src/plugins/organization/organization.ts (+4 -0)
📝 packages/better-auth/src/plugins/organization/routes/crud-org.ts (+27 -10)
📝 packages/better-auth/src/plugins/organization/team.test.ts (+0 -1)
📝 packages/better-auth/src/social-providers/reddit.ts (+1 -0)

📄 Description

Summary by cubic

Added a missing reference to the team model in the teamMember schema and fixed organization slug lookup when setting the active organization.

  • Bug Fixes
    • Ensured teamId in teamMember schema references the team model.
    • Fixed setActiveOrganization to correctly find organizations by slug.
    • Updated tests to cover activating organizations by slug.

🔄 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/3825 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 8/6/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/team-id-reference-map` --- ### 📝 Commits (9) - [`5dfae1f`](https://github.com/better-auth/better-auth/commit/5dfae1f664a80fc6d8528051038becc50ffd2b91) fix(org): use correct slug lookup when setting active org - [`29f7961`](https://github.com/better-auth/better-auth/commit/29f7961eef442ff8fd86e3c7aa1dc2f6baffa70a) docs: adding reference to surrealdb adapter rewrite (#3754) - [`97cdff4`](https://github.com/better-auth/better-auth/commit/97cdff418a9ec17798011bd5a14833022ea63547) chore(demo): replace isLoading using `useTransition` (#3775) - [`cb017be`](https://github.com/better-auth/better-auth/commit/cb017be025a31bde686eb8679ceb089c53ea0af1) fix(reddit): refresh access token should use `basic` auth (#3753) - [`5876cb4`](https://github.com/better-auth/better-auth/commit/5876cb4c7f0fba73ab2e7efa2f413b26f1c84c18) fix: add missing team reference in teamMember schema #3801 - [`165c437`](https://github.com/better-auth/better-auth/commit/165c4373e7eb67e8e7802220f3786172922a1233) test update - [`efdbfeb`](https://github.com/better-auth/better-auth/commit/efdbfeb90ddc5d60683a15aa3ef71bce33fa2d2e) update - [`b9dfa60`](https://github.com/better-auth/better-auth/commit/b9dfa60530653f8946302e1bae37e64295a4dc66) update - [`9eb4a83`](https://github.com/better-auth/better-auth/commit/9eb4a835f17160a622c3a0b8af65578c2e178a90) chore: remove changeset ### 📊 Changes **12 files changed** (+163 additions, -117 deletions) <details> <summary>View changed files</summary> 📝 `demo/nextjs/app/client-test/page.tsx` (+19 -21) 📝 `demo/nextjs/app/dashboard/user-card.tsx` (+21 -19) 📝 `demo/nextjs/components/sign-in.tsx` (+11 -11) 📝 `docs/app/docs/[[...slug]]/page.client.tsx` (+5 -8) 📝 `docs/components/generate-apple-jwt.tsx` (+45 -42) 📝 `docs/content/docs/adapters/community-adapters.mdx` (+1 -0) 📝 `packages/better-auth/src/plugins/organization/adapter.ts` (+10 -0) 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+19 -5) 📝 `packages/better-auth/src/plugins/organization/organization.ts` (+4 -0) 📝 `packages/better-auth/src/plugins/organization/routes/crud-org.ts` (+27 -10) 📝 `packages/better-auth/src/plugins/organization/team.test.ts` (+0 -1) 📝 `packages/better-auth/src/social-providers/reddit.ts` (+1 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Added a missing reference to the team model in the teamMember schema and fixed organization slug lookup when setting the active organization. - **Bug Fixes** - Ensured teamId in teamMember schema references the team model. - Fixed setActiveOrganization to correctly find organizations by slug. - Updated tests to cover activating organizations by slug. <!-- 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:08:28 -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#5028