我们正在运行一个基于 Spring 的项目,使用 Cognito 作为识别服务。
我们有一个项目要求为 Cognito 用户池中的用户自定义验证电子邮件和邀请电子邮件。 (见 here for the AWS doc
)
默认验证消息:
Your verification code is {####}.
默认邀请消息:
Your username is {username} and temporary password is {####}.
我们想包括
email
, phone_number
和 name
将用户属性添加到这些电子邮件中。是否有可能做到这一点?我搜索了文档但无济于事 - 并且真的需要一些建议。
最佳答案
更新:我认为正确的方法是使用 Custom Message
Cognito Lambda 触发器(需要实现一个功能)。然后您就可以访问所有userAttributes
.
文档:https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-message.html
关于spring - Cognito 自定义消息并包含用户属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41891501/