Skip to content

Commit c876b78

Browse files
committed
Fix cognito userpools username null in custom auth flow fixes #583
1 parent ce4b2de commit c876b78

File tree

1 file changed

+1
-1
lines changed
  • aws-android-sdk-cognitoidentityprovider/src/main/java/com/amazonaws/mobileconnectors/cognitoidentityprovider

1 file changed

+1
-1
lines changed

aws-android-sdk-cognitoidentityprovider/src/main/java/com/amazonaws/mobileconnectors/cognitoidentityprovider/CognitoUser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2757,7 +2757,7 @@ private InitiateAuthRequest initiateCustomAuthRequest(
27572757
Map<String, String> authenticationParameters = authenticationDetails.getAuthenticationParameters();
27582758
if (clientSecret != null &&
27592759
authenticationParameters.get(CognitoServiceConstants.AUTH_PARAM_SECRET_HASH) == null) {
2760-
secretHash = CognitoSecretHash.getSecretHash(usernameInternal, clientId, clientSecret);
2760+
secretHash = CognitoSecretHash.getSecretHash(authenticationDetails.getUserId(), clientId, clientSecret);
27612761
authenticationParameters.put(CognitoServiceConstants.AUTH_PARAM_SECRET_HASH, secretHash);
27622762
}
27632763
authRequest.setAuthParameters(authenticationDetails.getAuthenticationParameters());

0 commit comments

Comments
 (0)