Repository navigation
Keycloak JS Adapter - redirect to own page when keycloak is down #36533
|
We use Keycloak JS Adapter in our Angular application. The adapter redirects the user to Keycloak even when Keycloak is down, displaying a 503 Service Unavailable to the user. We would instead like to catch this and redirect the user to our own login-down-page. After some research we thought Have also tried to catch init exception without success. The other workaround we have thought about is manually doing a keycloak health check before the init: Anyone have any thoughts/suggestions? |
Replies: 1 comment 2 replies
|
In general, the OIDC/OAuth libraries (including the Keycloak JS Adapter) perform the traditional redirection without verifying whether the IdP is up. |
In general, the OIDC/OAuth libraries (including the Keycloak JS Adapter) perform the traditional redirection without verifying whether the IdP is up.
Therefore, I believe that if you want this functionality, you should implement it before initializing the library—perhaps by checking the OIDC .well-known endpoint.