Email verification redirectTo URL

Ready to post? :magnifying_glass_tilted_right: First try searching for your answer. Hello,

I have an application whit DEV and localhost environment in the same tenant. I need to redirect user when verify email to the each base URL.

Im using actually
{% if application.callback_domain == 'localhost' %}https://localhost:3001{% else %}{{ application.callback_domain }}{% endif %}

But always this condition falls in else statement.Any suggestion?

Hi there!

Welcome back to the Auth0 Community!

Thank you for posting your question. Your condition statement is ok, but the reason why itโ€™s not working may be due to the full URL format that includes the protocol (e.g., http://localhost or https://localhost. Try to edit your condition to this:

{% if application.callback_domain contains 'localhost' %}
    https://localhost:3001
{% else %}
    {{ application.callback_domain }}
{% endif %}

Thanks
Dawid