本文介绍了AWS Cognito-我可以在自定义身份验证流程中使用迁移触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调查最近发布的认知用户池迁移触发器。要启用触发器,您需要将InitiateAuthRequest中的AuthFlow类型设置为 USER_PASSWORD_AUTH,请参见此处: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-import-using-lambda.html

I am investigating the recently released migration trigger for cognito user pools. To enable the trigger you need to set the AuthFlow type in the InitiateAuthRequest to be "USER_PASSWORD_AUTH" see here: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-import-using-lambda.html

我想使用自定义身份验证流程,以便我可以返回质询响应以进行电子邮件验证,因为这些用户不是现有用户商店中已通过电子邮件验证的用户。但是,如果我将AuthFlow类型设置为 CUSTOM_AUTH,则不会触发迁移触发器。

I want to use the custom auth flow so that I can return a challenge response for email verification is the users are not email verified from the existing user store. However if I set the AuthFlow type to "CUSTOM_AUTH" then the migration trigger is not fired.

有没有办法让自定义身份验证和迁移同时进行?

Is there a way to get custom auth and migration working at the same time?

示例代码:

var client = new AmazonCognitoIdentityProviderClient(Amazon.RegionEndpoint.APSoutheast2);

var authRequest = new InitiateAuthRequest
{
    ClientId = "*********",
    AuthFlow = "USER_PASSWORD_AUTH" // Or AuthFlow = "CUSTOM_AUTH"
};

authRequest.AuthParameters.Add("USERNAME", username);
authRequest.AuthParameters.Add("PASSWORD", password);

var response = await client.InitiateAuthAsync(authRequest);


推荐答案

我在Cognito团队中,这是不可能的在此刻。但是,我可以将您在团队中的用例作为功能请求提及。

I am on the Cognito team and that is not possible at this point. I can however mention your use case within the team as a feature request.

这篇关于AWS Cognito-我可以在自定义身份验证流程中使用迁移触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 08:16