如何在 AWS Amplify 中使用验证码更改用户的电子邮件?

问题描述

AWS - Amplify - 我将 AWS Cognito 和 AWS Amplify 库与 React 应用程序(后端:NodeJS)一起使用,并且用户正在使用电子邮件进行登录。 我想使用前端的放大更改用户的电子邮件

我使用了这个:updateUserAttributes

1. updateUserAttributes() → old email changed to new email,email_verified: false
2. Sent verification code to the new email address
3. When I click the verification code on the mailBox,change to email_verified: true

在这种情况下,如果用户错误地将验证码发送到错误的电子邮件用户将无法使用和验证帐户。 因为此用户的电子邮件在 AWS Cognito 用户池中发生了变化。

因此用户在验证新电子邮件之前必须继续使用旧电子邮件。 我想让它像这样:

1. Send verification code to the new email address
2. When I click the verification code on the mailBox,the old email change to a new email 
and email_verified: true

明白了吗? 我想在点击验证码后更改电子邮件 你能帮我什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)