diff --git a/adapters/oidc/js/src/main/resources/keycloak.js b/adapters/oidc/js/src/main/resources/keycloak.js index 2def1e2a8e..427bd07737 100755 --- a/adapters/oidc/js/src/main/resources/keycloak.js +++ b/adapters/oidc/js/src/main/resources/keycloak.js @@ -832,9 +832,10 @@ document.body.appendChild(iframe); var messageCallback = function(event) { - if (event.origin !== loginIframe.iframeOrigin) { + if ((event.origin !== loginIframe.iframeOrigin) || (loginIframe.iframe.contentWindow !== event.source)) { return; } + if (event.data != "unchanged") { kc.clearToken();