Bug createOrganization
When creating an organization and passing the 
userId, the value of this ID is not being used. Registration is being done using the ID of the user who is performing the registration action.

4 Replies


I think this is intentional, its always using the session when providing headers, and fallsback on server when userId is provided.
GitHub
better-auth/packages/better-auth/src/plugins/organization/routes/cr...
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
It's beacause you're passing 
headers