【发布时间】:2018-11-28 20:59:02
【问题描述】:
我正在寻找有关如何扩展我们现有的 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(temppassword) ? password : temppassword });
如果生成的 context.AuthenticationResult 不为空,那么我们将参加比赛,我可以在随后调用 AWS API Gateway 端点时使用 context.AuthenticationResult.IdToken 作为 OAuthBearerToken,这些端点受相同的保护Cognito 用户池。
一切都很好,但现在我们正在尝试启用其他身份提供程序(首先从 Auth0 开始),我现在不知道如何为用户获取 API 网关将从 Cognito 识别的 IdToken位于已启用的身份提供程序之一中。
【问题讨论】:
-
想知道您是否最终找到了这方面的资源(我知道这是几年前的事了),因为我处于同样的情况,不知道该怎么做。跨度>
标签: aws-api-gateway amazon-cognito openid-connect aws-sdk-net