How can the error page determine which of the application the user was attempting to sign into?


When the browser is redirect to our own error page and the URL ‘error’ query param has a value of ‘invalid_request’, there seems to be no parameter from which to determine which of the applications the user was attempting to sign into. This means that we can only render a link that will take them generically to the login page URL that, after a successful sign in, will take them to the default application. Which is, quite possibly, not the application that they we intending. Do have any suggestions?

Many thanks,

Hey @JonHarvey,

Another option to set a custom error page is to set the html key of the error_page configuration option for your tenant, using our Management API.

By using Liquid Syntax, you can access certain variables related to the authorization request, and the error itself, as our documentation points out.

In particular, the variable you’re interested in is {client_id}. Depending on its value, you could dynamically render a different “Go back to login page” link.

Unfortunately, I don’t recall what attributes are passed to the error page when you host it in your own URL. If the alternative I described above doesn’t work for you, and still prefer using your own URL, please capture a HAR file of the complete auth transaction that leads to the error, and send it my way via DM. Please do not post the HAR file in this topic, for security reasons.