amazon-archives / amazon-cognito-identity-js

Amazon Cognito Identity SDK for JavaScript
Other
984 stars 454 forks source link

How can you require verification of Phone Number and Email before issuing tokens from InitiateAuth call? #680

Open garvinguan opened 6 years ago

garvinguan commented 6 years ago

If a user submits both an email and phone number to Cognito, a verification code for phone is sent and a custom separate workflow is needed for email verification as described in the docs.

https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-email-phone-verification.html

Since we want to require both fields (email / phone) to be verified), there are a few issues.

Is there a better workflow for requesting phone and email verification codes at the same time?