Skip to content

Commit

Permalink
Fix cognito userpools username null in custom auth flow fixes #583
Browse files Browse the repository at this point in the history
  • Loading branch information
minbi committed Jan 31, 2019
1 parent f36ff97 commit a393992
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2757,7 +2757,7 @@ private InitiateAuthRequest initiateCustomAuthRequest(
Map<String, String> authenticationParameters = authenticationDetails.getAuthenticationParameters();
if (clientSecret != null &&
authenticationParameters.get(CognitoServiceConstants.AUTH_PARAM_SECRET_HASH) == null) {
secretHash = CognitoSecretHash.getSecretHash(usernameInternal, clientId, clientSecret);
secretHash = CognitoSecretHash.getSecretHash(authenticationDetails.getUserId(), clientId, clientSecret);
authenticationParameters.put(CognitoServiceConstants.AUTH_PARAM_SECRET_HASH, secretHash);
}
authRequest.setAuthParameters(authenticationDetails.getAuthenticationParameters());
Expand Down

0 comments on commit a393992

Please sign in to comment.