登录页面中的AWS Cognito删除注册

时间:2019-02-20 09:23:13

标签: amazon-cognito

我正在使用Aws Cognito,但找不到从cognito登录页面删除“注册”按钮的解决方案。谢谢。

Cognito用户池提供了默认登录页面,其中包括“忘记密码”,登录和注册。但是我想从该页面隐藏/删除“注册”。

2 个答案:

答案 0 :(得分:1)

在AWS管理控制台中,转到Cognito,选择您的用户池,然后在“常规设置” /“策略”下选择“仅允许管理员创建用户”选项(此选项未选中“允许用户签名自己”上”)。

答案 1 :(得分:1)

如果您使用 CloudFormation,请将 AllowAdminCreateUserOnly 设置为 True,如下所示:

resources:
  Resources:
    # Creates a User Pool
    CognitoUserPool:
      Type: AWS::Cognito::UserPool
      Properties:
        # Generate a name based on the stage
        UserPoolName: ${self:custom.stage}-user-pool
        # Set email as an alias
        UsernameAttributes:
          - email
        AutoVerifiedAttributes:
          - email
        # Case sensitivity on the username input for the selected sign-in option.
        UsernameConfiguration:
          CaseSensitive: false
        AdminCreateUserConfig:
          AllowAdminCreateUserOnly: True # This setting disables self sign-up for users