From 040b32ead7e2bee9bb05f13666cf67fbce6b88b5 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 4 Feb 2016 09:47:25 +0100 Subject: [PATCH] KEYCLOAK-2446 Cordova not working --- adapters/oidc/js/src/main/resources/keycloak.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/adapters/oidc/js/src/main/resources/keycloak.js b/adapters/oidc/js/src/main/resources/keycloak.js index d8fdfc75e6..dad522e380 100755 --- a/adapters/oidc/js/src/main/resources/keycloak.js +++ b/adapters/oidc/js/src/main/resources/keycloak.js @@ -885,7 +885,10 @@ }); ref.addEventListener('loaderror', function(event) { - if (event.url.indexOf('http://localhost') != 0) { + if (event.url.indexOf('http://localhost') == 0) { + callback = parseCallback(event.url); + ref.close(); + } else { error = true; ref.close(); } @@ -917,7 +920,9 @@ }); ref.addEventListener('loaderror', function(event) { - if (event.url.indexOf('http://localhost') != 0) { + if (event.url.indexOf('http://localhost') == 0) { + ref.close(); + } else { error = true; ref.close(); }