Add afterSignUp function property to emailAndPassword #1567

Closed
opened 2026-03-13 08:49:16 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @andreilgeorgescu on GitHub (Jul 24, 2025).

Is this suited for github?

  • Yes, this is suited for github

I'd like to synchronize user data from another platform once a user signs up to mine.

Describe the solution you'd like

Add a property afterSignUp that does the same thing afterEmailVerification does except with signing up as its trigger.

Describe alternatives you've considered

Currently my only options are afterEmailVerification and onEmailVerification.

This isn't ideal because I'd like the data to be synchronized by the time the user logs in for the first time. I require email verification to login, so the time it takes for them to verify their email nearly guarantees this.

Originally created by @andreilgeorgescu on GitHub (Jul 24, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. I'd like to synchronize user data from another platform once a user signs up to mine. ### Describe the solution you'd like Add a property `afterSignUp` that does the same thing `afterEmailVerification` does except with signing up as its trigger. ### Describe alternatives you've considered Currently my only options are `afterEmailVerification` and `onEmailVerification`. This isn't ideal because I'd like the data to be synchronized by the time the user logs in for the first time. I require email verification to login, so the time it takes for them to verify their email nearly guarantees this.
GiteaMirror added the enhancement label 2026-03-13 08:49:16 -05:00
Author
Owner

@ping-maxwell commented on GitHub (Jul 24, 2025):

You can use an after hook to achieve this.
Add this to your auth config, and configure it to suit your needs:

Image

Read more here: https://www.better-auth.com/docs/concepts/hooks#after-hooks

@ping-maxwell commented on GitHub (Jul 24, 2025): You can use an after hook to achieve this. Add this to your auth config, and configure it to suit your needs: <img width="614" height="156" alt="Image" src="https://github.com/user-attachments/assets/371f98c7-cc10-459c-8f16-ed4073e47be9" /> Read more here: https://www.better-auth.com/docs/concepts/hooks#after-hooks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1567