diff --git a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java index 160e238799..d4c614d932 100644 --- a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java +++ b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java @@ -1279,7 +1279,11 @@ public static boolean reIssueExistingConfirmationCode(UserRecoveryData recoveryD int codeToleranceInMinutes = getEmailCodeToleranceInMinutes(); if (recoveryDataDO != null && codeToleranceInMinutes != 0) { if (RecoveryScenarios.NOTIFICATION_BASED_PW_RECOVERY.toString(). - equals(recoveryDataDO.getRecoveryScenario().toString())) { + equals(recoveryDataDO.getRecoveryScenario().toString()) || + RecoveryScenarios.SELF_SIGN_UP.toString(). + equals(recoveryDataDO.getRecoveryScenario().toString()) || + RecoveryScenarios.ASK_PASSWORD.toString(). + equals(recoveryDataDO.getRecoveryScenario().toString())) { long codeToleranceTimeInMillis = recoveryDataDO.getTimeCreated().getTime() + TimeUnit.MINUTES.toMillis(codeToleranceInMinutes); return System.currentTimeMillis() < codeToleranceTimeInMillis;