У меня есть секрет ha sh, сохраненный как:
var secretHash = {
SecretHash: '#####' //I have the actual secret hash entered in my js code
};
Я пытаюсь использовать userPool.signUp:
userPool.signUp(userData.Username, userData.Password, attributeList, null, function(result){
console.log(result);
newCognitoUser = result.user;
console.log('user name is ' + newCognitoUser);
});
Однако ошибка, которую я вижу, говорит :
{
code: 'NotAuthorizedException',
name: 'NotAuthorizedException',
message: 'Unable to verify secret hash for client ####' //I have an actual client number in the error
}
Из-за этого я пытаюсь добавить свой секретный ha sh в запрос на регистрацию, но я не уверен, как это реализовать, есть идеи? Я использую пакет amazon-cognito-identity- js.