0

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

LurenzZ
  • 23
  • 6
  • Does this answer your question? [AWS Cognito username/email login is case-sensitive](https://stackoverflow.com/questions/48342450/aws-cognito-username-email-login-is-case-sensitive) – Chaitanya Jun 23 '23 at 11:18

1 Answers1

0

If you call DescribeUserPool with the CLI, you will get back the full information for the pool. Sometimes this is easier to read than looking through the tabs in the console. One of the returned properties is the setting for case sensitivity.

"UsernameConfiguration": { 
     "CaseSensitive": boolean
  },
rlhagerm
  • 334
  • 6
  • Calling this API i don't get any information about the case sensitive setting, on the AWs forum told me: " 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. " – LurenzZ Jun 23 '23 at 13:04
  • So there is no UsernameConfiguration property on the response, or you don't get any response at all from that request? – rlhagerm Jun 23 '23 at 19:40
  • Right, there is no a UsernameConfiguration property in the response – LurenzZ Jun 24 '23 at 20:27
  • Ok, interesting. The comment above with the other SO thread is probably the best info, then. You could try it with a brand new user pool as indicated here: https://aws.amazon.com/blogs/security/how-to-set-case-sensitivity-in-the-amazon-cognito-console/, and if you can provide an example of it not working correctly then cut a ticket to AWS support. – rlhagerm Jun 26 '23 at 13:18