Resend verification email redirects to different address

When we making the first ‘verification email’, I’m getting my standard email template with the verification link, Which redirects to my callback_domain which it is my site.
However, When sending the “resend verification email”, i’m getting again the same standard email BUT upon clicking the confirmation link, I’m getting redirected to an auth0 screen (auth0/lo/verify_email?) with a basic “your email was confirmed message”, But i’m not being redirected to my website as i set on my email template control panel.
Any suggestions?

Hello, @or.ahlagi - welcome to the Auth0 Community!

If you go here:

And select the Verification Email (using Link) template, is the Redirect To value configured to the URL where you want to redirect?

Also, how are you attempting this second verification? I just triggered a verification email from my Dashboard and it worked as expected.




Thanks for answering.

Please do the following steps:

  1. Delete you user from Auth0.
  2. Register To auth0.
  3. When email verification is sent to your mail, do not verify, click on resend verification email from last registration site.
  4. New email verification will be sent to your mail. Verify it from this mail.

Now, tell me if it’s redirect? If not, what should we do in order to do so?

Thanks you so much

@or.ahlagi I assume that this button is set up in your end, and does a Management API v2 call, which is what we do in the Dashboard. Can you ensure that your call is correctly set up as well?

1 Like

This is my code for resend-verification email.
async resendVerificationEmail(userId: string): Promise<any> { await this.verifyToken(); return ( await this.httpService .post( '[](', { user_id: userId, client_id: this.config.get('auth0.angular_client_id') }, { headers: { authorization: this.header } } ) .toPromise() ).data; }

Hello, @or.ahlagi,

Unfortunately I won’t be able to review your code, but I can tell you that if you are making a call as stated here:!/Jobs/post_verification_email

You will get redirected accordingly. I just tried this myself and got redirected to my specified redirect URL.

Could you review the API reference, and try the call again?


1 Like

Hi …,

We went through the API documentation again.
We have 2 applications - one for the angular app, and one for the server with access to managment API.
Our API has a secure route that allows the use to request a verification email, and this route uses the managment API to do so, with the client_id field set to the client ID of the angular app.
The second verification email that we recieve is identical to the original one (as it should be), but using the link on this email doesn’t redirect us to our angular app.

Since all other fields in the email template are extracted correctly from the angular application, we believe that there is a problem with the Redirect To field of the email template when using the API with the client id field.

Let me know if you can reproduce this.

Hi, @or.ahlagi,

Can you confirm if the one where you’re receiving the “incorrect” link is a Machine to Machine application?


1 Like

Yes it’s machine to machine

@or.ahlagi Unfortunately, I’ve tried a setup exactly like the one you have and have not been able to reproduce the issue. I am:

  • Creating an M2M app
  • Using the Management API v2 to trigger a job to verify an email with the client ID set to the M2M app
  • I receive the email, click on it

After that, I get correctly redirected to my redirect URL.

I’m wondering if there’s anything else that you might be doing to cause this, or if anyone else has any other ideas on what could be going on.

1 Like

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