How to do custom actions on after normal sign up and Google
I have an app that when a user creates account it should create an org and assign the user to that org. I am trying to find a good way to do it but it is not that obvious since signing with google is not specified if it is login or sign up. I have seen the webhooks but was not able to understand how to use it (I understood the concept only) have any one ever done something similar or has any Idea? Thanks
Solution:Jump to solution
Most cases with creating orgs on signup (including social provider signups), we recommend just doing it in a database hook: https://www.better-auth.com/docs/concepts/database#1-before-hook
From here, you create the org and assign the user to it....
Database | Better Auth
Learn how to use a database with Better Auth.
2 Replies
Solution
Most cases with creating orgs on signup (including social provider signups), we recommend just doing it in a database hook: https://www.better-auth.com/docs/concepts/database#1-before-hook
From here, you create the org and assign the user to it.
Database | Better Auth
Learn how to use a database with Better Auth.
Nice, thanks
Such an elegant solution
@Ping Thanks mate