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
preguntada hace 2 años202 visualizaciones
1 Respuesta
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
respondido hace 2 años
  • 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.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas