【发布时间】:2020-12-31 09:08:37
【问题描述】:
我正在尝试使用 AWS Cognito 对用户进行身份验证,并使用 Vanilla JS 从 AWS 获取令牌。
在他们的文档中他们有this example。问题是,当我关注它时,我会收到以下错误
ErrorValidationException: 3 validation errors detected: Value 'value' at 'accountId' failed to satisfy constraint: Member must have length less than or equal to 15; Value 'value' at 'accountId' failed to satisfy constraint: Member must satisfy regular expression pattern: \d+; Value 'value' at 'identityPoolId' failed to satisfy constraint: Member must satisfy regular expression pattern: [\w-]+:[0-9a-f-]+
对于这些变量
var IDENTITY_POOL_ID = "value";
var ACCOUNT_ID = "value";
var REGION = "value";
我使用了 AWS 为我生成的数据(我不想在此处显示它们)。
我只是对为什么这不起作用感到困惑,因为这是他们文档中的一个非常简单的示例,并且它使用的是由 AWS 生成的数据
【问题讨论】:
标签: javascript amazon-web-services amazon-cognito