Open poyashad opened 1 year ago
Hey @poyashad :wave: thanks for raising this! You should be able to set this trigger through the CLI, which will configure things for you. Do you see the same result after creating this trigger through the CLI with amplify update auth
?
Hi sorry I misunderstood "Manual changes to the cloud resources managed by Amplify". I have used Amplify CLI for adding the trigger.
? Do you want to configure Lambda Triggers for Cognito? Yes
? Which triggers do you want to enable for Cognito (Press <space> to select,
<a> to toggle all, <i> to invert selection)
❯◯ Learn More
──────────────
◯ Create Auth Challenge
◉ Custom Message
◯ Define Auth Challenge
◯ Post Authentication
◉ Post Confirmation
Hey @poyashad no worries! I'm seeing similar behavior where I've created a user in the Cognito User Pool console and received the invitation message with the subject specified in my custom message Lambda but the body from the default setting
going through a React frontend and creating an account I can confirm the HTML renders properly
I also tried removing the HTML block from the emailMessage
to see if it was related to the returned HTML but was not successful. It appears that the message is ignored entirely when sending an invitation message.
I'm going to mark this as a dependency issue and bring this to the Cognito team for further investigation
Hi @josefaidt thank you for testing the code!
Hi @josefaidt, do you have any updates on this? Is there a workaround available? Additionally, can we consider using a transactional service(like sendgrid) to send both the verification and invitation messages? We really need the styling.
Thanks!
How did you install the Amplify CLI?
No response
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
12.1.1
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Added Lambda Trigger Custom Message
Describe the bug
I have encountered an issue where the HTML content is not rendering correctly in the email message when the event is triggered as "CustomMessage_AdminCreateUser". The code appears to be generating the HTML correctly, as I can see the expected HTML structure in the logs. However, when the email is received, the HTML content is not displayed properly.
The generated HTML content is not rendering properly in the email message for the CustomMessage_AdminCreateUser event.
I am getting the default Email Message "Your username is {username} and temporary password is {####}" but the Email Subject is changed as according to my code
Please note that this issue does not occur when the event is triggered as "CustomMessage_SignUp". In that case, the HTML content is correctly displayed in the email message.
Expected behavior
The email message for the CustomMessage_AdminCreateUser event should display the generated HTML content correctly, including the header, paragraph, and button/link.
Reproduction steps
To reproduce the issue, follow these steps:
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm: