【问题标题】:AWS Cognito sign up without password to get email confirmation linkAWS Cognito 无需密码即可获得电子邮件确认链接
【发布时间】:2019-10-05 08:22:53
【问题描述】:

我想为注册应用制作一个简单的流程。
用户仅使用电子邮件注册 -> 验证/注册链接发送到电子邮件 -> 人们在该链接上注册(输入密码)

我在 Google 上搜索过任何东西,但没有找到任何使用 AWS Cognito 的方法。
看起来 Cognito 正在强制用户至少使用电子邮件和密码进行注册才能获得确认链接

【问题讨论】:

标签: amazon-web-services amazon-cognito registration


【解决方案1】:

您可以通过adminCreateUser API 调用注册用户。他们将收到一封带有临时密码的电子邮件。这种方法是可配置的。

见:https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminCreateUser.html

【讨论】:

    【解决方案2】:

    使用:AdminCreateUser

    • 使用 AWS 管理控制台或调用 AdminCreateUser API 创建新的用户配置文件。指定临时密码(将是您的用户密码)或允许 Amazon Cognito 自动生成一个。

    • 指定是否将提供的电子邮件地址和电话号码标记为新用户已验证。

    • 通过 AWS 管理控制台为新用户指定自定义 SMS 和电子邮件邀请消息。 指定邀请消息是通过 SMS、电子邮件还是两者发送。

    成功创建用户后

     1. authenticate user using same user credentials
            Use: SDK calls InitiateAuth(Username, USER_SRP_AUTH)
    
     2. After success of initateAuth, amazon Cognito returns the PASSWORD_VERIFIER challenge with Salt & Secret block.
    
     3. Use RespondToAuthChallenge(Username, <SRP variables>, PASSWORD_VERIFIER
    
     4. Amazon Cognito returns the NEW_PASSWORD_REQUIRED challenge along with the current and required attributes.
    
     5. The user is prompted and enters a new password and any missing values for required attributes.
    
     6. Call RespondToAuthChallenge(Username, <New password>, <User attributes>).
    
     7. After successful password change user can be able to login using same credentials added by you.
    

    简答

           -  In that case, you can specify the temporary password(will  allow Amazon Cognito to automatically generate one.).
    
           -  all user users will be forced to change their password only at first login.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-12
      • 2010-11-05
      • 2016-09-19
      • 1970-01-01
      相关资源
      最近更新 更多