如果用户不存在,则不会调用AWS Cognito Pre身份验证/ Define Auth Challenge lambda挂钩 [英] AWS Cognito Pre authentication/Define Auth Challenge lambda hooks are not invoked if user doesn't exist

查看:116
本文介绍了如果用户不存在,则不会调用AWS Cognito Pre身份验证/ Define Auth Challenge lambda挂钩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实质上是在尝试创建一个中间件,该中间件在登录用户之前会做一些工作。但是,当我尝试使用不存在的用户登录时,不会运行任何lambda挂钩。

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.

推荐答案

这是预期的。在调用预身份验证触发器之前,Cognito会检查用户是否存在。这样一来,它便可以将 sub, email, phone等必填信息传递给触发器。现在,当您在用户界面中输入了错误的用户时,Cognito检查会导致用户不存在错误。

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.

这篇关于如果用户不存在,则不会调用AWS Cognito Pre身份验证/ Define Auth Challenge lambda挂钩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆