When I access my app, my Keycloak config is passed to the .init() function to initialize however when I do this, the app stalls and nothing renders on the page, I am not redirected to the keycloak page. The following method is called within index.js before anything is rendered and App should only render upon authentication
const initKeycloak = (onAuthenticatedCallback) => {
_kc.init({
onLoad: 'check-sso',
silentCheckSsoRedirectUri: window.location.origin + '/silent-check-sso.html',
pkceMethod: 'S256',
})
.then((authenticated) => {
if (!authenticated) {
doLogin();
}
onAuthenticatedCallback();
})
.catch(console.error);
};
When I run, nothing loads and the following is repeated over and over in the logs: [HMR] Waiting for update signal from WDS...
. I am unable to reach the .then() part of the function. If i remove the auth code, page renders as normal.
NOTE: The keycloak server I am using is a deployed instance and not a local instance. I have checked versions of both keycloak server and keycloak-js and they match