Welcome mail and verification page bypassing
Was wondering if anyone has experience with sending welcome mail after successful email verification.
Also wondering if I can send users somewhere other than the verification page but still have their emails verified through the verification link. Thinking of building out some sort of user onboarding process or something as a project
2 Replies
Hi @Wlski. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To answer your questions about welcome emails and email verification in Wasp:
1. Sending welcome email after successful verification:
Wasp doesn't have a built-in feature specifically for sending welcome emails after verification. However, you can customize the sign-up process to achieve this. You could modify the custom sign-up action to send a welcome email after the email is verified. The custom sign-up action documentation (https://wasp-lang.dev/docs/auth/email#creating-a-custom-sign-up-action) shows how to customize the sign-up process, which you could extend to include sending a welcome email.
2. Bypassing the verification page:
Yes, you can customize where users are directed after clicking the verification link. In the
main.wasp
file, you can specify a custom client route for email verification:
You can then define this route to point to your custom onboarding process instead of the default verification page. Email Verification Flow documentation (https://wasp-lang.dev/docs/auth/email#email-verification-flow)
To still verify the email while redirecting to a custom page, you would need to:
1. Create a custom page/component for your onboarding process.
2. In this component, use the verifyEmail
action from Wasp to verify the email token:
3. After verifying the email, you can proceed with your custom onboarding process.
This approach allows you to verify the email and immediately start your onboarding process without showing a separate verification page.
Remember to handle cases where the verification might fail, and provide appropriate feedback to the user.
For more detailed implementation, you might need to refer to Wasp's documentation or reach out to their community for specific code examples tailored to your use case.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Wlski, 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?I think the bot gave a good answer 🙂 did that work for you