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
posta 5 mesi fa98 visualizzazioni
Nessuna risposta

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