- Newest
- Most votes
- Most comments
Hello,
Thank you for posting on AWS re:Post!
I understood that you would like to customize the confirmation email getting sent on password reset to the user.
You can implement this by using custom message lambda trigger, This trigger will get invoked when forgot password action performed. You can refer below AWS reference document for more information on custom message lambda trigger.
https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-message.html
Cognito natively doesn't send password reset link it only sends verification code. However, you can use event that is getting sent to custom message lambda trigger to build the password reset link in below format.
https://yourwebsitedomain/forgot-password?confirmation_code=${event.request.codeParameter}&user_name=${event.userName}
In this case, you need to use custom UI where user will enter new password. On submission of the new password, extract user name and confirmation code from URL query parameter and new password from user input. Use ConfirmForgotPassword API with userpool client ID and extracted parameters to reset the password.
I hope this information will be helpful to you.
Thank you!!
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago