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?

posta 2 anni fa203 visualizzazioni
1 Risposta
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
con risposta 9 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande