AWS - Serverless Architecture
Given this AWS SDK code snippet to authenticate a user, what will be the output if the password is incorrect?
const params = {
AuthFlow: 'USER_PASSWORD_AUTH',
ClientId: 'abc123',
AuthParameters: {
USERNAME: 'user1',
PASSWORD: 'wrongpass'
}
};
cognito.initiateAuth(params, (err, data) => {
if (err) console.log(err.code);
else console.log('Success');
});