From b9cf13c59864dd2c8b1b42b8f8e4b85f72bcb6a4 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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..ae3bfd12a00 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 @@ -361,7 +361,7 @@ } 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.isSubdomain(domainName, hostName) ? domainName : IdentityUtil.getRootDomain(hostName); JSONObject contentValueInJson = new JSONObject(); contentValueInJson.put("username", tenantAwareUsername);