how to get OTP for all Cognito user's ?

0

I am using the AWS cognito user pool, where users can enter their phone numbers or email-based login. While the users log in with their email or phone number, they will receive an OTP with both their phone number and email. Only registered phone numbers and emails at AWS SNS and SES can receive an OTP.

This will happen based on AWS Cognito user-pool lambda triggers(Create auth challenge, Define auth challenge, and Verify auth challenge).

Now my problem was that every Cognito user, while logging in, couldn't receive OTP because they didn't register in SNS or SES. They are the only registered users in the Cognito user pool.

How could we change that?

while every user, while logging into their email or phone number, must receive an OTP to their respective input value (like email or phone number).

1개 답변
0
수락된 답변

Thank you for reaching out us regarding the above query.

While configuring Auth category in Amplify with OTP based authentication, I could observe that it throws an warning message after the push operation as - "⚠️ You have enabled SMS based auth workflow. Verify your SNS account mode in the SNS console: https://console.aws.amazon.com/sns/v3/home#/mobile/text-messaging If your account is in "Sandbox" mode, you can only send SMS messages to verified recipient phone numbers."

Therefore, could you please check if your SES and SNS account mode is out of Sandbox mode or not. This is because "Sandmox" mode in SES and SNS has some restriction and it allows only verified recipents. However, if they are in Production then, you would be able to send messages.

[+] SNS : https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html [+] SES : https://docs.aws.amazon.com/ses/latest/dg/request-production-access.html

Having said that, in case you face further challenges, please feel free to open a support case with AWS using the following link.

AWS
지원 엔지니어
답변함 일 년 전
profile picture
전문가
검토됨 7달 전

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

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

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

관련 콘텐츠