gpt4 book ai didi

amazon-web-services - 可以通过编程方式在 Cognito 中将 email_verified 设置为 true 吗?如何?

转载 作者:行者123 更新时间:2023-12-05 06:36:24 25 4
gpt4 key购买 nike

当我通过 updateAttributeadminUpdateAttribute API 更新 Cognito 用户的电子邮件属性时,email_verified 将设置为 false。所以我想以编程方式将 email_verified 设置为 true。

我的理解是应该使用GetUserAttributeVerificationCodeVerifyUserAttribute API来设置email_verified为true,但是我不想让用户输入验证码。 https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUserAttributeVerificationCode.html https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerifyUserAttribute.html

就我在下面看到的,这似乎是不可能的。
https://forums.aws.amazon.com/thread.jspa?messageID=782609

最佳答案

是的,可以使用 UpdateUserAttributes。每the docs :

In your call to AdminCreateUser, you can set the email_verified attribute to True, and you can set the phone_number_verified attribute to True. (You can also do this by calling AdminUpdateUserAttributes.)

  • email: The email address of the user to whom the message that contains the code and username will be sent. Required if the email_verified attribute is set to True, or if "EMAIL" is specified in the DesiredDeliveryMediums parameter.

关于amazon-web-services - 可以通过编程方式在 Cognito 中将 email_verified 设置为 true 吗?如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49129950/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com