AWS Cognito Pre authentication/Define Auth Challenge lambda hooks are not invoked if user doesn't exist

天大地大妈咪最大 提交于 2019-12-24 10:36:40

问题


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.



来源:https://stackoverflow.com/questions/48632911/aws-cognito-pre-authentication-define-auth-challenge-lambda-hooks-are-not-invoke

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!