create organization on signup
What is the best way to handle creating organization when user signs up?
I implemented email sign up, I am not sure where to put creating organization logic.
Solution:Jump to solution
Look into Database hooks: https://www.better-auth.com/docs/concepts/database#database-hooks
Database | Better Auth
Learn how to use a database with Better Auth.
3 Replies
Solution
Look into Database hooks: https://www.better-auth.com/docs/concepts/database#database-hooks
Database | Better Auth
Learn how to use a database with Better Auth.
Mind giving a working example on this? I've tried multiple ways sharing the same header but still getting 401 errors.
Don't use headers for this case, you can pass a
userId
in the body