1

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?

João Angelo
  • 56,552
  • 12
  • 145
  • 147
ckapilla
  • 1,148
  • 13
  • 25
  • i can think of two ways to tackle this: 1. create a modal which asks user to login without redirecting, once login is successful hide the modal 2. save the url in local storage and redirect to home page. when user successfully logs in redirect to the original requested url. just my thoughts, there could be better ways. :) – Ric K Nov 11 '16 at 08:24

1 Answers1

2

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
João Angelo
  • 56,552
  • 12
  • 145
  • 147