简体   繁体   中英

AWS Cognito User Pool Custom Authentication Lambdas Not Triggering

I'm trying to implement the AWS Congito Custom Authentication flow for User pool (as suggested in their documentation . I have defined very basic logic in the define, create and verify challenges.

  1. My define-challenge Lambda does not use any SRP or user_password authentication and issues a "CUSTOM_CHALLENGE" with only a single session event.
  2. My create-challenge Lambda similarly has a very simple logic of asking for a single input.
  3. My verify-challenge Lambda just prints the input and returns a success (for any kind of input)

I currently dont see the <cognito_domain>/login?client_id= etc triggering any of these Lambdas that I have defined in the User Pool settings. The lambda invocation metrics also dont show any calls made by Cognito to Lambda. I'm pretty sure I've added the Lambda triggers to the userpool properly and I can see the userpool has the permission to invoke the lambda as well (adding the lambda triggers from the console automatically adds the permissions as well). 在此处输入图像描述

How do I get Cognito to start triggering my Custom Authentication lambdas?

According to this document , they said that

Note The Amazon Cognito hosted sign-in webpage can't activate Custom authentication challenge Lambda triggers.

You have to write your own custom login flow using one of Cognito's SDKs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM