Learn how to create a custom error page for authorization error events.
When an authorization error occurs, and your callback URL is valid, the returns the appropriate error and state parameters to your callback URL. If your callback URL is invalid, your application will display the default Auth0 error page.Your application may also display the default Auth0 error page for reasons other than an invalid callback URL, such as:
Required parameters are missing when calling the Auth0 Authentication API Login endpoint.
User opens an expired password reset link (when using the Classic Login experience).
User navigates to a bookmarked login page and a Default Login Route is not specified.
If you choose to configure a custom error page, the Authorization Server will return parameters appended to the URL as a query string.
Parameter
Description
client_id
Identifier of the Auth0 application.
connection
Connection used at the time of error.
lang
Language set for use at the time of error.
error
Error code of the error.
error_description
Description of the error.
tracking
Identifier used by Auth0 to find errors in internal logs.
Parameters presented vary depending on the error type and are specific to the request. For example, if the request which resulted in an error did not contain a client_id, the Authorization Server will not return the client_id parameter.
Redirect users to a custom error page using the Management API
Use the Update Tenant Settings endpoint. Replace the {mgmtApiAccessToken} placeholder value with your Management API , and update the value of the url field in the JSON body to point to the location of the error page.
When errors are shown as part of the Classic Login widget (such as an expired password reset link), an Auth0-hosted custom error page will not be rendered, even if configured.
Use the Management API Update Tenant Settings endpoint. Replace the {mgmtApiAccessToken} placeholder value with your Management API Access Token, and update the value of the html field in the JSON body to a string containing the HTML of your page.You can use Liquid syntax to include the following variables: