Email verification succeeds but invalid result url error thrown

We are having trouble with email verification. Upon new user creation, the user receives the verification email. When the user clicks on the button to verify their email, it opens up a new browser window which shows them the error dialog saying their email address could not be verified.

However, in the auth0 dashboard I can see that the verification is successful and the email_verified flag is set to true.

Also in the auth0 logs I’m seeing a “Failed Verification Email” event with the description below:

invalid result url: ?supportSignUp=true&supportForgotPassword=true&email=<<email-redacted>>&message=Your%20email%20was%20verified.%20You%20can%20continue%20using%20the%20application.&success=true&code=success

I found these two earlier issues:

We use SendGrid, and I did turn off click tracking to test if that makes a difference - it does not.

My question is - since the verification is successful (as seen from the auth0 dashboard), it appears that somehow the link is being hit twice and the second hit is throwing the error - why does auth0 show the error dialog on the second hit? It should just redirect the user to the redirect url since the email is already verified.

Please let me know if I can provide any additional info to help.

Appreciate the help.

I think I found the cause of this issue - I have been testing email verification with a user created in the auth0 dashboard. As I understand from this long and informative thread -
Redirect To for classic login doesn't work any user created in the dashboard will have an empty {{ application.callback_origin }} resulting in an invalid redirect_to url. So even though the email verification succeeds, since auth0 cannot redirect to a bad url, the error dialog is shown to the user.

All makes sense, but it would be great it this is added to the documentation, or better yet as a caveat under the Redirect To field in the Email Verification configuration. Would have saved me a few hours of debugging. :slight_smile:

1 Like

Thanks a lot for sharing it with the rest of community! I will report it back to our docs team!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.