i have created a cognito user pool and configured it to use boath email and phone number as signin aliases , i have a signup flow where i create a user profile with email only and then update the user attribute by adding phone number and then verify the number , the thing is i can only log in with the email address as a user name and when i try to use phone number as a user name i get error occurred (UserNotFoundException) when calling the InitiateAuth operation: User does not exist.
- i have the user pool setup to use email,phone-number as a sign in alias
- i use aws cli InitiateAuth command
- i have a custom auth flow to handel passweodless authentication, but even when i try standard username,and password auth i get the same result,
- i dont have any pre sign up triggers
what i have tried
1- disable custom auth triggers and run simple username and password authentication
2- craete user from the consol and use the phone number as the primary user name ,
this allowed me to signin with phone number but again when i add and verify the email i am unable to use it a sign in user
3- boath phone number and email are verified and the account statuse is confirmed
4- used the cloude watch to debug any issues during the signup proccess but non found
i simply want my users to choose each time whether thy want to sign in with email or phone number