Skip to content

Commit

Permalink
Fix invalidating recovery code
Browse files Browse the repository at this point in the history
  • Loading branch information
kayathiri4 committed Jan 7, 2025
1 parent 55bf5a4 commit ae47871
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,13 @@ public RecoveryChannelInfoDTO retrieveUsersRecoveryInformationForUsername(Map<St
user, recoveryScenario, RecoverySteps.RESEND_CONFIRMATION_CODE);

notificationChannelList = getNotificationChannelListForRecovery(notificationChannels);
recoveryCode = UUID.randomUUID().toString();
recoveryFlowId = UUID.randomUUID().toString();
// Skip recovery code generation for question based recovery as it is not required.
if (StringUtils.equals(QUESTION_BASED_PWD_RECOVERY.name(), recoveryScenario.name())) {
return buildUserRecoveryInformationResponseDTO(username, recoveryFlowId, null,
notificationChannelDTOS);
}
recoveryCode = UUID.randomUUID().toString();

if (Utils.reIssueExistingConfirmationCode(recoveryDataDO,
NotificationChannels.EMAIL_CHANNEL.getChannelType())) {
Expand Down

0 comments on commit ae47871

Please sign in to comment.