Login error getPasswordPolicy 'Match error: Missing key 'token''

Description

When I have a user reset their password, I get this odd message in my logs. It doesn’t break anything and the user is able to reset their password, but the bright red error message bugs the hell out of me and makes the product look clunky.

This is the message I’m getting from my log on the problem.

I do not have any password policies in place. I have even tried enabling password policies to see if it would generate this ‘token’ but that didn’t work. I’m not sure what token it is referring to honestly and can’t seem to find any mention of it in the documentation.

Server Setup Information

  • Version of Rocket.Chat Server: 5.0.3
  • Operating System: Ubuntu 22.04
  • Deployment Method: DigitalOcean 1 click
  • Number of Running Instances: 1
  • NodeJS Version: 14.19.3
  • MongoDB Version: 5.0.6

Hi!

Maybe this is related to this issue?

The hard part here is to replicate the error, making it easy to the dev team to tackle it.

That sounds fairly close to the what I’m seeing. It happens anytime the user has to change their password. If I force a reset form the admin console, after they login and reset their password that message appears.

Hi!

Just noticed a recent PR that was merged into develop that touches this part of the code base and can potentially fix this isse:

If you want to test it, you can spin up a docker instance, and change the image tag to develop, so you can get the latest image.

Also, consider joining our Beta Testers Channel and help us testing new fix and features.

Thanks!