From f9f83fa8699492f53e9fec19e461ba0a46b6008a Mon Sep 17 00:00:00 2001 From: Yoshani Date: Fri, 20 Sep 2024 08:10:38 +0530 Subject: [PATCH] get root domain of custom domain for alor --- .../src/main/webapp/self-registration-process.jsp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-process.jsp b/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-process.jsp index 382966995ab..59ea68cf0c3 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-process.jsp +++ b/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-process.jsp @@ -359,9 +359,8 @@ } else { tenantAwareUsername = username + "@" + user.getTenantDomain(); } - String domainName = application.getInitParameter(AUTO_LOGIN_COOKIE_DOMAIN); String hostName = ServiceURLBuilder.create().build().getProxyHostName(); - String cookieDomain = IdentityUtil.isSubdomain(domainName, hostName) ? domainName : hostName; + String cookieDomain = IdentityUtil.getRootDomain(hostName); JSONObject contentValueInJson = new JSONObject(); contentValueInJson.put("username", tenantAwareUsername);