W
Wasp4mo ago
conspyre

User is getting "Email verification failed, invalid token" unlike 9,000 before him

User is e-mailing me with screenshot from his attempt to log in. Dialog "Email verification". Toast message "Email verification failed, invalid token" and this is 100% coming from the "VerifyEmailForm" component in wasp-lang. I can't find any reason on my end why the user should be getting this. User is on a @gmail.com address Wasp version 0.14.0
2 Replies
kapa.ai
kapa.ai4mo ago
Hi @conspyre. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The "Email verification failed, invalid token" error occurs when the token used for email verification is invalid or has expired. This is a common issue with email verification flows in Wasp. Here are some possible reasons and solutions for this problem: 1. Token Expiration: The verification token might have expired. By default, verification tokens have a limited validity period. 2. Invalid Link: The user might have clicked on an incorrect link or the token in the URL might be malformed. 3. Development Mode Workaround: For development purposes, you can skip email verification by setting an environment variable:
SKIP_EMAIL_VERIFICATION_IN_DEV=true

SKIP_EMAIL_VERIFICATION_IN_DEV=true

in your .env.server file Email Verification Flow. 4. Resending Verification Email: Unfortunately, the knowledge sources don't provide a direct method to resend a verification email. However, as mentioned in a Discord thread, one workaround is to have the user go through the "reset password" flow, which might also verify their email Discord support thread. 5. Check Implementation: Ensure your email verification setup is correctly implemented according to the documentation. The client route should handle taking the token from the URL and sending it to the server using the verifyEmail action Email Verification Config. 6. Verify Email Content: Make sure the verification email content is properly formatted and the verification link is correctly constructed Email Verification Config. If the issue persists, you might want to: - Check your server logs for more detailed error messages - Verify that your email verification flow is properly set up in your main.wasp file - Ensure the VerifyEmailForm component is correctly implemented in your client pages The issue might also be related to how the token is being processed or validated on the server side, but the knowledge sources don't provide enough information about debugging this specific error. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @conspyre, 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?
Filip
Filip4mo ago
Hey @conspyre, do you have the token, have you verified it's valid? I think I can help, but I'll need the token and the app to see what's going on.

Did you find this page helpful?