© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Is there any way to create organization after user create hook? - Better Auth
BA
Better Auth
•
12mo ago
•
12 replies
nikatune
Is there any way to create organization after user create hook?
Im getting UNAUTHORIZED error because im trying to create an organization for user with using user
:
{ create
:
{ after
{
}
}
} hook
.
Is there any way to avoid it
?
Solution
since you have the user id
, remove
headers
headers
and pass
userId
userId
in the body instead
Jump to solution
Similar Threads
Recent Announcements
Similar Threads
create organization in databaseHooks.user.create.after
BA
Better Auth / help
13mo ago
is there any way to pre -create users?
BA
Better Auth / help
11mo ago
Create role after create organization
BA
Better Auth / help
4mo ago
Create organization after singUp
BA
Better Auth / help
13mo ago