Cognito didn't error on missing required email

0

Hello! I was testing sign-up in my app and I expected that I would trigger a Cognito error by leaving the email field (required in my pool) blank, but to my surprise it did not error and instead created the user with '-' for their email. Is this the intended behavior?

asked 2 years ago192 views
1 Answer
0

Hi,

From the description of your issue it appears that you are using standard attributes for your Amazon Cognito. Standard attributes are optional by default for all users. To make an attribute required, during the user pool creation process, select the Required check box next to the attribute. From the documentation here[1] I can confirm that “When you mark a standard attribute as Required, a user can't register unless they provide a value for the attribute”.

Reference: [1]. AWS Amazon Cognito User pool attributes documentation: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html

Thank you.

AWS
answered 9 months ago

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