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
支持工程师
已回答 5 个月前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则