'How to authenticate a Cognito user after migration?

By backing up and restoring a user pool, the sensitive credentials (TOTP, passwords) of any users are stripped away. To authenticate them with our app, in practical terms, they need to set a password again.

Problem is that I don't know how to achieve this technically. When I attempt to log in to a user who has been migrated/restored, the client recieves a DTO:

{
"ChallengeName": "PASSWORD_VERIFIER",
  "ChallengeParameters": {
    "SALT": "",
    "SECRET_BLOCK": ""
    "SRP_B": "",
    "USERNAME": "",
    "USER_ID_FOR_SRP": ""
  }
}

I understand that the Client needs to fulfill this challenge, but I have been unable to find any documentation or guides online on how to correctly respond.

Please help me out?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source