My code works in all the user pools I’ve created. But it doesn’t in the production pool, without any clear reason I can find through the AWS console or CLI.
I have some suspects but no real evidence. If you run into a weird issue like this, try using the User ID (Sub)
as the username
instead of the email
. It should work either way, and it does in every other pool, but well... This workaround made it for me.