在API网关中,您可以设置一个引用Cognito User Pool进行身份验证的Cognito Authorizer。为了进行验证,API Gateway期望在Authorization头中设置Cognito User Pool JWT令牌。 使用'aws-sdk‘和’amazon-cognito identity-js‘NPM包,我如何创建来宾/未经身份验证的用户并检索JWT令牌以传递到API网关?所谓访客/未认证,我的意思是甚至没有用户名或电子邮件。或者,这在当前的API中是不可能的吗? Amplify (构建在Cognito之上)似乎有类似的东西:https://docs.a
我正在寻找关于如何扩展我们现有的Cognito身份验证过程的文档,以包括其他“启用的身份提供者”。
目前我们做了以下工作
var userPool = new CognitoUserPool(poolId, clientId, provider); var user = new CognitoUser(username, clientId, userPool, provider); var context = await user.StartWithSrpAuthAsync(new InitiateSrpAuthRequest { Password = string.IsNullOrEmpty
我看过类似的问题,但无法解决我的问题。我正在开发一个web应用程序,其中用户将使用AWS Cognito的身份验证进行身份验证。注册部分是正常的,但当我尝试登录时,我得到了“未授权”异常。我已经尝试将自定义策略附加到我的IAM角色(授权sts:AssumeRoleWithWebIdentity),但不起作用。下面是代码的编写方式:
var cognitoUser = new AWSCognito.CognitoIdentityServiceProvider.CognitoUser(userData);
cognitoUser.authenticateUser(authentic
这些是我从AWS Cognito获取访问令牌的调用。我正在实现,我在后端对用户进行身份验证。我的代码:
cognitoIndentityClient = Aws::CognitoIdentity::Client.new(
region: 'us-east-1',
credentials: permanent_aws_creds,
)
developerProviderName = '1.Got From Developer Provider Name under Custom in Cognito Console'
ide