[PR #4765] [MERGED] fix(organization): allow passing id through beforeCreateOrganization #5570

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4765
Author: @ping-maxwell
Created: 9/19/2025
Status: Merged
Merged: 9/19/2025
Merged by: @himself65

Base: canaryHead: fix/org-pass-id-in-beforeCreateOrganization


📝 Commits (2)

  • 8e31d9e fix(organization): allow passing id through beforeCreateOrganization
  • 893aa35 chore: lint

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/adapter.ts (+1 -0)

📄 Description

Fixes: https://github.com/better-auth/better-auth/issues/4751


Summary by cubic

Make the org adapter respect IDs passed via beforeCreateOrganization. Adds forceAllowId: true so custom IDs are saved instead of being overwritten.


🔄 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/4765 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 9/19/2025 **Status:** ✅ Merged **Merged:** 9/19/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/org-pass-id-in-beforeCreateOrganization` --- ### 📝 Commits (2) - [`8e31d9e`](https://github.com/better-auth/better-auth/commit/8e31d9e155bf56aced9ae764caed537bde9d451c) fix(organization): allow passing id through `beforeCreateOrganization` - [`893aa35`](https://github.com/better-auth/better-auth/commit/893aa352ddbf4f5e9aa4beb792ebdaecdc4779d3) chore: lint ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/adapter.ts` (+1 -0) </details> ### 📄 Description Fixes: https://github.com/better-auth/better-auth/issues/4751 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Make the org adapter respect IDs passed via beforeCreateOrganization. Adds forceAllowId: true so custom IDs are saved instead of being overwritten. <!-- 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:27:55 -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#5570