Hey, we are trying to define a custom error page for all kinds of errors the user encounters in contact with Auth0.
We found docs from Auth0 on how to do that. We follow this approach which redirects the user to a custom URL.
We tried that out and entered a URL in this format:
When we now force an error (e.g. when an password reset link is expired), the user gets redirected with query params representing the error.
However, the redirect does not go to
https://domain.de/my-sub-path, but instead it goes to
https://domain.de/. This means, that the path in our config is ignored.
How can we make sure, that the user is redirected to the URL including the sub path, when an error appears? Are we making a mistake with the configuration?
We would be thankful for any tip into the right direction.
Welcome to the Auth0 Community
As per your linked document I’m assuming you have populated the error page setting in Settings → General tab → Error Pages e.g.
The issue could be with the test that you’re doing, the password reset flow uses the default login route (if using New Universal Login) which may be configured as https://domain.de/ on your tenant/application.
You could perhaps test by browsing to the /authorize endpoint of your application but pass in a redirect_uri that does not exist in your application on Auth0 i.e. it does not exist in the list of callback urls. This should generate an error and redirect to your custom error page.
For example, browse to:
Ensure https://jwt.io does not exist in the list of callback url’s on the application in Auth0 that represents YOUR_CLIENT_ID
Hey @SaqibHussain ,
you were totally right. My test was somehow broken. With your test with the unauthorized callback URL, the redirect worked correctly.
It also now works with an old password reset link, which is now expired.
I somehow expected, that I would also get an error page, when I try to reuse a link, that has already been used. But instead, it basically works and I get redirected to the app like when I just changed the password. Auth0 seems to know, that the link was already used successfully and therefore just sends me to the app.
Thanks for the clarification. Have a nice week.
Great news, I’m glad I was able to help.
All the best.