diff --git a/.changeset/shy-phones-cough.md b/.changeset/shy-phones-cough.md new file mode 100644 index 00000000000..2aa76d6e708 --- /dev/null +++ b/.changeset/shy-phones-cough.md @@ -0,0 +1,5 @@ +--- +"@wso2is/identity-apps-core": patch +--- + +Revert "Fixed redirection issue in Go Back button in expired password reset error page" diff --git a/identity-apps-core/apps/recovery-portal/src/main/webapp/error.jsp b/identity-apps-core/apps/recovery-portal/src/main/webapp/error.jsp index a820eea65c0..cc75fad2ba2 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/webapp/error.jsp +++ b/identity-apps-core/apps/recovery-portal/src/main/webapp/error.jsp @@ -1,5 +1,5 @@ <%-- - ~ Copyright (c) 2016-2024, WSO2 LLC. (https://www.wso2.com). + ~ Copyright (c) 2016-2023, WSO2 LLC. (https://www.wso2.com). ~ ~ WSO2 LLC. licenses this file to you under the Apache License, ~ Version 2.0 (the "License"); you may not use this file except @@ -44,7 +44,6 @@ String errorMsg = IdentityManagementEndpointUtil.getStringValue(request.getAttribute("errorMsg")); String errorCode = IdentityManagementEndpointUtil.getStringValue(request.getAttribute("errorCode")); String invalidConfirmationErrorCode = IdentityRecoveryConstants.ErrorMessages.ERROR_CODE_INVALID_CODE.getCode(); - String expiredConfirmationErrorCode = IdentityRecoveryConstants.ErrorMessages.ERROR_CODE_EXPIRED_CODE.getCode(); String callback = request.getParameter("callback"); boolean isValidCallback = true; @@ -205,11 +204,10 @@ var errorCodeFromParams = "<%=errorCode%>"; var invalidConfirmationErrorCode = "<%=invalidConfirmationErrorCode%>"; - var expiredConfirmationErrorCode = "<%=expiredConfirmationErrorCode%>"; - // Check if the error is related to the confirmation code being invalid or expired. + // Check if the error is related to the confirmation code being invalid. // If so, navigate the users to the URL defined in `callback` URL param. - if (errorCodeFromParams === invalidConfirmationErrorCode || errorCodeFromParams === expiredConfirmationErrorCode) { + if (errorCodeFromParams === invalidConfirmationErrorCode) { window.location.href = "<%=Encode.forHtmlAttribute(callback)%>"; return;