I'm essentially trying to create a middleware that will do some work before logging a user in. However, none of the lambda hooks run when I try to log in with a user that doesn't exist in aws cognito.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
This is expected. Before calling the pre-authentication trigger, Cognito checks to see if the user exists. This is so that it can pass required information like 'sub', 'email', 'phone' etc. to the triggers. Now, when you put the wrong user in the UI, the Cognito check results in a 'User does not exist' error.