cognito pool only uses the primary username attribute to login and ignore other aliases

0

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

bakar
posta un mese fa420 visualizzazioni
1 Risposta
0

Hello

Looks like the new attribute value is not taken into account..

Have you tried migrate to new user pool with the correct configuration. You can do so using migration lambda trigger (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-migrate-user.html)?

BR

AWS
Serge
con risposta un mese 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