diff --git a/js/libs/keycloak-js/dist/keycloak.d.ts b/js/libs/keycloak-js/dist/keycloak.d.ts index 6478a9eb40..bc0947c2fd 100644 --- a/js/libs/keycloak-js/dist/keycloak.d.ts +++ b/js/libs/keycloak-js/dist/keycloak.d.ts @@ -450,6 +450,11 @@ declare class Keycloak { */ timeSkew?: number; + /** + * Whether the instance has been initialized by calling `.init()`. + */ + didInitialize: boolean; + /** * @private Undocumented. */ diff --git a/js/libs/keycloak-js/src/keycloak.js b/js/libs/keycloak-js/src/keycloak.js index f3b46164ca..720b4c0deb 100755 --- a/js/libs/keycloak-js/src/keycloak.js +++ b/js/libs/keycloak-js/src/keycloak.js @@ -37,6 +37,8 @@ function Keycloak (config) { interval: 5 }; + kc.didInitialize = false; + var scripts = document.getElementsByTagName('script'); for (var i = 0; i < scripts.length; i++) { if ((scripts[i].src.indexOf('keycloak.js') !== -1 || scripts[i].src.indexOf('keycloak.min.js') !== -1) && scripts[i].src.indexOf('version=') !== -1) {