Cognito登录验证电子邮件未获取用户名

时间:2019-07-03 06:21:51

标签: amazon-web-services amazon-cognito

我已经设置了Cognito,但是电子邮件验证页面无法正确获取我的用户名(打印占位符)。

我的认知设置如下enter image description here

以及我收到的验证电子邮件如下: enter image description here

我是否必须为此使用自定义lambda触发器? (如何实现)

更新:使用“ event.userName” 在lambda触发器中获取用户名

import * as Rx from 'rxjs'

1 个答案:

答案 0 :(得分:1)

显然,许多占位符在简单的电子邮件验证中不起作用。您可以使用自定义消息lambda触发器动态地自定义消息。他们的文档中有node.js的代码示例。您可以使用它来编写自己的代码。

以下是文档:https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-message.html