diff --git a/.changeset/great-pears-applaud.md b/.changeset/great-pears-applaud.md new file mode 100644 index 00000000000..b5a9558322b --- /dev/null +++ b/.changeset/great-pears-applaud.md @@ -0,0 +1,5 @@ +--- +"@wso2is/identity-apps-core": patch +--- + +set root domain of proxy hostname in alor cookie 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);