[keycloak-user] Custom Error Page

Muein Muzamil shmuein+keycloak-dev at gmail.com
Fri Mar 24 00:02:57 EDT 2017


You can add customize the error page by adding error.ftl in your theme, If
it is not defined in your them than KeyCloak uses it from the base theme.
For reference look for error.ftl in the default keycloak themes.

Regards,
Muein

On Thu, Mar 23, 2017 at 7:29 PM, Troy Wilson <troyboy.wilson at gmail.com>
wrote:

> Hi everyone,
>
> I was wondering if anyone has any ideas on how to get keycloak to display
> custom error pages.
>
> Background:
>
> We have some custom providers that may throw exceptions.
> If one of these exceptions is thrown, we get a stack trace.
> We can turn off the stack trace by changing the "stack-trace-on-error"
> attribute as described on
> https://docs.jboss.org/author/display/WFLY8/Undertow+
> subsystem+configuration
>  .
> When this attribute is set to none, the server responds with the following
> response (copied from fiddler proxy server)
>
> HTTP/1.1 500 Internal Server Error
> Connection: keep-alive
> Content-Type: text/html;charset=UTF-8
> Content-Length: 80
> Date: Fri, 24 Mar 2017 00:16:14 GMT
>
> <html><head><title>Error</title></head><body>Internal Server
> Error</body></html>
>
>
> What we would like to do is, display a page in keeping with the theme of
> the application, ideally be able to call the
> <keycloak-root>/theme/<theme>/login/error.ftl file.
>
> Any help / guidance on this would be greatly appreciated.
>
> Troy
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>


More information about the keycloak-user mailing list