Cognito CustomMessage_AdminCreateUser mandatory use of {username} in template

0

I would like to use email or preferred_username in a template for CustomMessage_AdminCreateUser.

But it seems that Cognito requires that {username} must be present in a template, otherwise the default message is sent.

We cannot use "username" as we use this attribute to store uuid for a user. Including it in a message does not make sense.

Is there any way of preventing Cognito checking the presence of {username} in a template so the other attributes can be displayed as well?

Vasyl
已提问 2 年前202 查看次数
1 回答
1

Unfortunately, as you described, the username parameter is required. If it is missing, the default message template is used. A possible workaround is to use a HTML tags to hide the username value but this does not remove the username from the message. Again, a username parameter is required in the template.

AWS
Taka_M
已回答 2 年前
  • Thanks for the reply. Any plans to allow to use "alternative usernames/aliases" in templates any soon? HTML Workaround does not seem like a good option.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则