[英]Cognito UnknownError after turn on device registration
As per requirement, I need to turn on device registration to Always
. 根据要求,我需要将设备注册设置为
Always
。 However, our SRP flow starts failing with the below issue. 但是,我们的SRP流程因以下问题而开始失败。
{ code: 'UnknownError', message: 'Unknown error, the response body from fetch is: undefined' }
After doing some research, I found one similar post , but it seems like the only solution is to turn device registration off. 经过研究,我发现了一个类似的帖子 ,但似乎唯一的解决方案是关闭设备注册。
It's failing while running node get-token.js
script to retrieve token for our CI/CD testing pipeline. 运行
node get-token.js
脚本以检索我们的CI / CD测试管道的令牌时失败。
cognitoUser.authenticateUser(authCfg, {
onSuccess: function (result) {
console.log("Result : ", result);
const token = result.getAccessToken().getJwtToken();
resolve(token)
},
onFailure: function(err) {
console.error("Failure : ", err);
console.log(new Error().stack);
reject(new Error("An error occurred: " + err))
},
newPasswordRequired: function (userAttributes, requiredAttributes) {
cognitoUser.completeNewPasswordChallenge(p, userAttributes, this);
},
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.