From c38baa32baeff59e15cd5e64ae882765fd1be243 Mon Sep 17 00:00:00 2001 From: stianst Date: Tue, 21 Jan 2020 09:19:05 +0100 Subject: [PATCH] KEYCLOAK-12685 Set callback URI for identity providers to use frontend URL --- .../theme/base/admin/resources/js/controllers/realm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js b/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js index b7e7cd83fe..ab6a95bcab 100644 --- a/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js +++ b/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js @@ -1012,7 +1012,7 @@ module.controller('RealmIdentityProviderCtrl', function($scope, $filter, $upload } }, true); - $scope.callbackUrl = encodeURI($location.absUrl().replace(/\/admin.*/, "/realms/") + realm.realm + "/broker/") ; + $scope.callbackUrl = authServerUrl + "/realms/" + realm.realm + "/broker/"; $scope.addProvider = function(provider) { $location.url("/create/identity-provider/" + realm.realm + "/" + provider.id);