'AWS Cognito-remove signup in login page

I am using Aws Cognito and not able to find the solution for removing the Signup button from cognito login page.Thank you.

Cognito user pool provides the default login page with Forgot Password,signin and signup.But I want to hide/remove the Signup from that page.



Solution 1:[1]

In the AWS management console, go to Cognito, select your your user pool, then, under 'General Settings' / 'Policies' select option 'Only allow administrators to create users' (this deselects option 'Allow users to sign themselves up').

Solution 2:[2]

If you are using CloudFormation set AllowAdminCreateUserOnly to True like this:

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

Solution 3:[3]

you can hide the forget password and signup text by making following changes in CSS template.css file. to download this css file go to your user pool -> app clients -> choose your app client -> Hosted UI customization -> edit -> above the csv upload button you can see the link fot cssTemplate.css file. dowload it and make following chanes. i.e. replace .redirect-customizable class code with following :-

.redirect-customizable {display:none;}

upload this new file and save the changes. refresh the login page. you can see forget pwd and signup text is not there. thanks :)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 J.R.
Solution 2 Marcin Rapacz
Solution 3