Cognito User Pool Custom Authentication Flow does not trigger PreAuthentication Lambda

0

Hi All - We have a use case where before generating the one time passcode via SMS (With Create Auth Challenge Lambda), we need to identify the user's mobile platform so that within create auth challenge lambda we could execute the required logic. According to the Cognito doc, PreAuthentication lambda should get invoked every time a sign In attempt (Or initiateAuth) is made. That seemed to be the appropriate place to store the mobile platform (coming via User Matadata/validation data in request) so that create auth challenge can look it up against the user. However, we found the preauthentication Lambda trigger is not triggering at all (For Custom Auth Flow). We also noticed (via AWS CLI) that when we change the auth flow to User Password, it does get invoked. Please let me know what I could be doing wrong. Or if this is the expected behavior then: 1. Documentation link, where it clearly states that and 2. What could be the best way to achieve what I am looking for in the above use case? Thanks in advance.

Rahul
demandé il y a 5 mois98 vues
Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions