Correct way to create webhooks
Hi everyone. Just want to know the best practice around creating a webhook. I want to send a post request to my other server (I have a Django server I’m using for a few protected APIs) that will only happen when a new user is created. Would I use the an after hook for this? I want to send some nonsensitive user information (user name, email, user id) and store it in Django. then when a user makes a request to my other api I can verify their identity and authentication state with JWT and JWKs.
3 Replies
yeah you can either use hooks or db hooks
https://www.better-auth.com/docs/concepts/hooks
https://www.better-auth.com/docs/concepts/database#database-hooks
Hooks | Better Auth
Better Auth Hooks let you customize BetterAuth's behavior
Database | Better Auth
Learn how to use a database with Better Auth.
Awesome thank you @bekacru I’ll run it.