Henry Sachs
Henry Sachs

Reputation: 302

Amazon Cognito JS Authflow doesnt send password for usermigration

Hi Guys im trying to migrate one userpool into another. Therefore i try to go this way: https://docs.aws.amazon.com/en_en/cognito/latest/developerguide/user-pool-lambda-migrate-user.html

when shifting the authflow to USER_PASSWORD_AUTH my password still isnt in the Request. Sample Code:

  const cognitoUser = new AWSCognito.CognitoIdentityServiceProvider.CognitoUser(userData);
  cognitoUser.setAuthenticationFlowType("USER_PASSWORD_AUTH");
  console.log(authenticationDetails);
  cognitoUser.authenticateUser(authenticationDetails, {

Authenticationdetails consists of the username and password

Error is the following:

Missing required parameter PASSWORD

Upvotes: 2

Views: 357

Answers (2)

Timothy Jeffcoat
Timothy Jeffcoat

Reputation: 805

I had to explicitly state the newest version number in my package.json.

"dependencies": {
    "amazon-cognito-identity-js": "^3.0.7",

Upvotes: 2

Henry Sachs
Henry Sachs

Reputation: 302

The answer was that this is only possible with Cognito SDK > 2.0.2

Upvotes: 2

Related Questions