Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fixed redirection issue in Go Back button in expired password reset error page" #6899

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shy-phones-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/identity-apps-core": patch
---

Revert "Fixed redirection issue in Go Back button in expired password reset error page"
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
Loading