AWS Cognito login by email case-sensitivity

0

Hi all,

Are Cognito userpool really case-insensitive by default? I have created a Cognito userpool configuring the email as the only login field, but when I try to login using some uppercase letters in my email I get a login error "Incorrect username or password."

The Cognito doc says :

Amazon Cognito user pools that you create in the AWS Management Console are case insensitive by default. When a user pool is case insensitive, user@example.com and User@example.com refer to the same user. When usernames in a user pool are case insensitive, the preferred_username and email attributes also are case insensitive.

Describing my user pool configuration i found: "UsernameAttributes": [ "email" ],

but nothing related to the case sensitive.

Have you some tips to figure out what the default behavior is for the email login?

Thanks in advance Lorenzo

asked 10 months ago563 views
2 Answers
1

the default behaviour from the console is case insensitive. Once you create the pool with the default behaviour, you will not see anything shown at the output of aws cognito-idp describe-user-pool command. However, if you set the behavior to case-sensitive at creation, you will see UsernameConfiguration structure at the output :


"UsernameConfiguration": {
            "CaseSensitive": true
        }
AWS
answered 10 months ago
profile picture
EXPERT
reviewed 10 months ago
0

Are you setting up your user pool to be case sensitive when you create it?
Can you confirm that "CaseSensitive" is not "true" in the following command?
If this setting is not "False," then the text is case-sensitive.

aws cognito-idp describe-user-pool --user-pool-id your_user_pool_id

https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-case-sensitivity.html

Creating a case-sensitive user pool If you create resources with the AWS Command Line Interface (AWS CLI) and API operations such as CreateUserPool, you must set the Boolean CaseSensitive parameter to false. This setting creates a case-insensitive user pool. If you do not specify a value, CaseSensitive defaults to true. This default is the opposite of the default behavior for user pools that you create in the AWS Management Console. Before February 12, 2020, user pools defaulted to case sensitive regardless of platform.

You can use the Sign-in experience tab of the AWS Management Console or the DescribeUserPool API operation to review the case sensitivity settings for each user pool in your account.

profile picture
EXPERT
answered 10 months ago
  • Hi, as the Behrang_KS's answer says creating the userpool with the default option I can't see the value from the API

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions