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?

feita há 2 anos203 visualizações
1 Resposta
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
respondido há 9 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas