-
Notifications
You must be signed in to change notification settings - Fork 220
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
Fix Multi Attribute Username Resolving Issue for resend-code #792
Fix Multi Attribute Username Resolving Issue for resend-code #792
Conversation
@@ -64,7 +68,7 @@ public Response resendCodePost(ResendCodeRequestDTO resendCodeRequestDTO) { | |||
ResolvedUserResult resolvedUserResult = FrameworkUtils.processMultiAttributeLoginIdentification( | |||
resendCodeRequestDTO.getUser().getUsername(), resendCodeRequestDTO.getUser().getTenantDomain()); | |||
if (ResolvedUserResult.UserResolvedStatus.SUCCESS.equals(resolvedUserResult.getResolvedStatus())) { | |||
resendCodeRequestDTO.getUser().setUsername(resolvedUserResult.getUser().getUsername()); | |||
resendCodeRequestDTO.getUser().setUsername(resolvedUserResult.getUser().getPreferredUsername()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can u check whether password recovery[1] API also affected with the same issue
[1]
Line 60 in 48a9447
resolvedUser.setUserName(resolvedUserResult.getUser().getUsername()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
There is NO issue in password recovery API since it needs the username in the format
<USER_STORE>/<USERNAME>
for secondary user store users unlike in resend code. -
Tested with Primary and Secondary user store users and the flows are working as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline let's create a git issue to track this inconsistencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR builder started |
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/7284627735
Purpose
resend-code
by getting thepreferred username
(which doesn't include user store name with the username) instead ofusername
.Related Issues