W
Wasp•2w ago
AAA

AfterEmailVerificationHook

Is there an afterEmailVerificationHook so I can send a welcome email?
4 Replies
kapa.ai
kapa.ai•2w ago
Hi @VS. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the provided knowledge sources, there is currently no specific afterEmailVerificationHook available in Wasp for sending a welcome email after email verification. However, there are a few relevant points to consider: 1. Wasp is planning to add hooks for running code after/before signup/login in the future, but this feature is not yet implemented. As mentioned in the Discord support thread, these hooks are planned for the next bigger release, which might take 1-2 months to be released. 2. In the meantime, you can implement custom logic after signup by creating your own custom sign-up action. This is described in the Wasp documentation on creating a custom sign-up action. However, this approach requires implementing your own Auth UI component and signup action, which might be more complex than using a simple hook. 3. For sending emails in general, Wasp provides an emailSender API that you can use in your custom actions. You can find more information about this in the Wasp documentation on sending emails. To implement a welcome email after email verification with the current Wasp features, you would need to create a custom email verification flow and manually trigger the welcome email send after the verification is complete. However, this would require significant custom implementation and is not as straightforward as using a hook. If you need this functionality urgently, you might want to consider implementing a custom solution. Otherwise, it might be worth waiting for the upcoming release that will include hooks for auth-related events. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @VS, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
AAA
AAAOP•2w ago
!solved, will do after onboarding the user
miho
miho•2w ago
This is a good idea, we should offer hooks for all parts of the user auth lifecycle đź‘Ť
miho
miho•2w ago
GitHub
Add support for onAfterEmailVerified hook · Issue #2453 · wasp-la...
We are missing one hook in the email auth lifecycle: User registers 2. (Account is not fully created - the email is unverified) They receive on email They verify their email by clicking on a link 5...

Did you find this page helpful?