How to get rid of the period in AWS Cognito’s default password reset email
Does your password for Cognito never seem to work? This may be why.
The Problem
If you use AWS Cognito, you have almost certainly come across this issue at some point.
You’ve just set up your lovely new user pool, created a user, and sent a password. It even arrived.
However, when you try to log in, it doesn’t work. You get repeated login failures, like this:
So, you reset it. Same issue again. This can’t be right?! You even copied and pasted it…
And therein lies the problem.
When using Cognito, it has a set of default templates it uses to add content to the emails it sends.
Obviously, there’s a grammar pedant working on the AWS Cognito team, because the standard template has a period at the end of the password.
If you copy and paste the whole password, as we often do, you will also copy the period. However, the password itself does not actually contain a period, so you get an authentication failure.