- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在 aws lambda(环境 nodejs6.10)中遇到问题,尝试将用户注册为自定义提供程序。我在后端调用 getOpenIdTokenForDeveloperIdentity,并使用以下参数:
const params = {
IdentityPoolId: config.IDENTITY_POOL_ID,
Logins: {
[config.DEVELOPER_PROVIDER_NAME]: id
}
}
负责调用的代码很简单:
const cognitoidentity = new AWS.CognitoIdentity({apiVersion: '2014-06-30'})
return cognitoidentity.getOpenIdTokenForDeveloperIdentity(params).promise()
.then(...)
不幸的是,Cognito 的答案是这个错误:
{
"message": "Not Found",
"code": "UnknownError",
"statusCode": 404,
"time": "2017-09-13T16:50:12.832Z",
"requestId": "4RQE2T66K7LOT3RBGOMN0JO82NVV4KQNSO5AEMVJF66Q9ASUAAJG",
"retryable": false,
"retryDelay": 58.96973108302359
}
两年前我用几乎相同的代码完成了这个任务,并且仍然可以工作,但在这个项目中却不能。我为未经身份验证的用户制作了一个小型 Web 客户端,它与 Cognito 配合得很好,所以我假设 Cognito 设置正确。 cognito 和 lambda 的区域相同,即 us-east-1。角色和策略似乎是正确的,lambda 有权使用 Cognito Identity 执行所有操作。我现在不知道该怎么办,只是想如果解决不了这个问题就离开cognito。请帮忙。
其他相关部分信息:我使用的是无服务器框架,但认知身份池是手动创建的(角色相同)。
Lambda 允许的权限:
[
"cognito-identity:DeleteIdentities",
"cognito-identity:DescribeIdentity",
"cognito-identity:GetOpenIdTokenForDeveloperIdentity",
"cognito-identity:ListIdentities",
"cognito-identity:LookupDeveloperIdentity",
"cognito-identity:MergeDeveloperIdentities",
"cognito-identity:UnlinkDeveloperIdentity"
]
代码初始化
const AWS = require('aws-sdk')
AWS.config.update({
region: config.REGION
})
AWS.config.setPromisesDependency(require('bluebird'))
最佳答案
已解决:问题是由于 AWS 配置中的端点错误造成的,由我的 dynamodb 数据层加载
关于node.js - Aws Cognito 联合身份在 getOpenIdTokenForDeveloperIdentity() 上回答 UnknownError Not Found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46213660/
有人知道R中的槽是什么吗? 我没有找到其含义的解释。我得到一个递归定义:“槽函数返回或设置有关对象的各个槽的信息” 帮助将不胜感激,谢谢 -胡同 最佳答案 插槽链接到 S4 对象。槽可以被视为对象的一
我有一个字符串“a.b”,我想替换“.”和 ”_”。 gsub(".","_","a.b") 不能作为 .匹配所有字符。 gsub("\.","_","a.b") 只是给我一个错误。 阅读 ?gsub
我是一名优秀的程序员,十分优秀!