GIVEN an incorrect BAD_DOMAIN in the Keycloak configuration and Keycloak registered in the App.Module
WHEN the App.Module attempts to compile and initialize Keycloak with a domain that is down
THEN I will encounter a compilation error and will see no useful information and I cannot proceed even if I want anonymous access.
- [x ] bug report -> please search for issues before submitting
You will receive a white-page and Angular compilation stops at App.Module level. No useful information will be rendered or compiled.
Desired functionality.
A graceful failure where the application will render. This is a big blocker for websites that utilize Keycloak for logins but fails if the application needs anonymous access as well. If the Keycloak /auth/ domain is ever down, you will receive the whitepage. An expectation would be if the Keycloak /auth/ domain is down for the application, we would want to disable login features.
Bug Report or Feature Request (mark with an
x
)GIVEN an incorrect BAD_DOMAIN in the Keycloak configuration and Keycloak registered in the App.Module WHEN the App.Module attempts to compile and initialize Keycloak with a domain that is down THEN I will encounter a compilation error and will see no useful information and I cannot proceed even if I want anonymous access.
Versions.
"@angular/core": "^16.2.12", "keycloak-angular": "^14.0.0", "keycloak-js": "^18.0.0",
Repro steps.
keycloakConfig: { url: 'BAD_DOMAIN', realm: 'realm-example', clientId: 'example-client-id', }; return keycloak.init({ config: keycloakConfig, initOptions: { onLoad: 'check-sso', silentCheckSsoFallback: false, silentCheckSsoRedirectUri: document.baseURI + 'assets/silent-check-sso.html', checkLoginIframe: false, enableLogging: true, checkLoginIframeInterval: 10_000, }, bearerExcludedUrls: [ 'https://api-dev.publicrecords.usco.lctl.gov/search_service', 'https://api-test.publicrecords.usco.lctl.gov/search_service', ], enableBearerInterceptor: true, });
The log given by the failure.
You will receive a white-page and Angular compilation stops at App.Module level. No useful information will be rendered or compiled.
Desired functionality.
A graceful failure where the application will render. This is a big blocker for websites that utilize Keycloak for logins but fails if the application needs anonymous access as well. If the Keycloak /auth/ domain is ever down, you will receive the whitepage. An expectation would be if the Keycloak /auth/ domain is down for the application, we would want to disable login features.