I am trying to do the following:
AWSUtil.generateSecretHash('[email protected]', ClientId).then(SECRET_HASH => {
return AWSUtil.Cognito.adminInitiateAuth({
AuthFlow: 'USER_PASSWORD_AUTH',
ClientId,
UserPoolId: process.env.COGNITO_USER_POOL_ID,
AuthParameters: {
USERNAME: '[email protected]',
PASSWORD: 'lamepassword123',
SECRET_HASH
}
}).promise();
})
.then(resp => {
console.log(resp)
});
It will not return anything but "Initiate Auth method not supported."
According to the docs, this should work. What gives?