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
bekacru
bekacru2mo ago
yeah you can either use hooks or db hooks
bekacru
bekacru2mo ago
Hooks | Better Auth
Better Auth Hooks let you customize BetterAuth's behavior
Database | Better Auth
Learn how to use a database with Better Auth.
yoyojoe
yoyojoeOP2mo ago
Awesome thank you @bekacru I’ll run it.

Did you find this page helpful?