Best way to create an organization
I'm handling all my authentication server-side. Once a user is created, I want to create an organization of which that user is the sole owner and member. However, I'm curious about the most natural way to do this.
A user fills in their details on the frontend and provides an org name.
I was thinking it could be in a database hook for the user on the create method that's run after a user is created. But in that instance, I'm curious how I can get the organization's name passed to the backend so that I can use this database hook.
Alternatively I can call the createOrganization method on the server file that handles the registration. But that doesn't allow me to streamline user creation as neatly as I would if I were able to use the databaseHook.
Thanks.
0 Replies