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?

질문됨 2년 전203회 조회
1개 답변
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
답변함 9달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인