fix(organization): updated types for the user argument in allowUserToCreateOrganization to support custom fields (#3600)

* fix: organization allowUserToCreateOrganization user argument typing

* chore: changeset

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
This commit is contained in:
Timur
2025-08-01 17:45:14 +02:00
committed by GitHub
parent 884d3d5c1e
commit 7fa90f8d4d
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"better-auth": patch
---
fix(organization): updated types for the user argument in `allowUserToCreateOrganization` to support custom fields

View File

@@ -25,7 +25,7 @@ export interface OrganizationOptions {
*/ */
allowUserToCreateOrganization?: allowUserToCreateOrganization?:
| boolean | boolean
| ((user: User) => Promise<boolean> | boolean); | ((user: User & Record<string, any>) => Promise<boolean> | boolean);
/** /**
* The maximum number of organizations a user can create. * The maximum number of organizations a user can create.
* *