【发布时间】:2020-11-20 08:49:51
【问题描述】:
将 AWS Cognito 旧用户池迁移到新用户池。并且还为此编写了 lambda 触发器。 Lambda 触发器似乎在 AWS Lambda 测试中工作,但在我使用 Application 登录时没有被触发。
只是为了详细描述这个问题。我有 iOS 应用程序,我已经在其中迁移了用户池,并且在阅读了一些内容后了解了需要在代码中实现的授权流程的更改。在代码中使用 ADMIN_USER_PASSWORD_AUTH 质询以获得 non_SRP 用户名和密码。无法弄清楚如何在代码的授权方法中实现它。 总之要调用用户迁移触发器如何使用 USER_PASSWORD_AUTH 进行身份验证?
func getDetails(_ authenticationInput: AWSCognitoIdentityPasswordAuthenticationInput,
passwordAuthenticationCompletionSource: AWSTaskCompletionSource<AWSCognitoIdentityPasswordAuthenticationDetails>) {
if currentUsername == nil || currentPassword == nil {
return
}
let authDetail = AWSCognitoIdentityPasswordAuthenticationDetails.init(username: currentUsername!,
password: currentPassword!)
passwordAuthenticationCompletionSource.set(result: authDetail)
}
【问题讨论】:
标签: ios swift amazon-web-services aws-lambda amazon-cognito