Skip to content

Commit

Permalink
Fix invalidating recovery code (#902)
Browse files Browse the repository at this point in the history
kayathiri4 authored Jan 16, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 8420b25 commit 84f94ab
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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())) {

0 comments on commit 84f94ab

Please sign in to comment.