首页 > 解决方案 > AWS Cognito 托管 UI - 如何允许 EXTERNAL_PROVIDER 用户创建密码?

问题描述

在 Cognito 中,有什么方法可以允许用户(帐户状态:外部提供商)为其帐户创建密码并使用用户名和密码登录。我正在使用托管 UI。

考虑一个用户使用谷歌登录方法登录并且用户池有一个用户条目的情况。我已经为用户提供了一个首选的用户名和电子邮件选项来登录。但由于它还没有密码,用户应该能够使用忘记密码的方法来重置他们的密码。但是我收到错误“在当前状态下无法重置用户密码”。您能否建议是否有任何方法或解决方法。

谢谢。

标签: node.jsamazon-cognitoaws-amplify

解决方案


You cannot create a password for an EXTERNAL_PROVIDER user. The password is handled directly by your provider and Cognito Hosted UI only retrieve the user fields you previously mapped in the configuration.

If you try to change the password of your user connected by Google, you will get the following error :

User is not authorized to change password.

Because the password can only be changed with the provider.


推荐阅读