ckapilla
ckapilla

Reputation: 1178

How to customize Auth0 error page when there's a callback URL mismatch error?

I want to prevent my users from seeing the 'Oops something went wrong' error page when there is a callback URL mismatch.

This will happen whenever a user saves a bookmark to an internal URL in my Angular 2 SPA. I have added a number of possible internal URLs as callback URLs, and those work, but I can't do that for every possible URL.

I tried setting auth.params for redirectUrl, but if I set redirect = true then it ignores my redirectUrl and uses the original. If I set redirect = false the login will succeed, but my app opens on the home page, not the redirectUrl itself.

Is there some way I can intercept the something went wrong error and provide a more user-friendly message?

Upvotes: 1

Views: 873

Answers (1)

João Angelo
João Angelo

Reputation: 57718

You can either customize the Auth0 generic error page to contain information about your company, like for example, name and support email addresses or you can configure Auth0 to display a fully custom error page.

The configuration of fully custom error pages can be done in more than one way, check Custom Error Pages for more details:

  • You may redirect the user to a custom error page
  • You may configure Auth0 to render a custom error page on your behalf

Upvotes: 2

Related Questions