I assume that you have used the 'Send test' functionality in Users > Automated Emails.
Using this functionality for the ResetPasswordEmail
template in the Portal does not send valid password reset codes. It is just meant to display the template as the end user will see it.
You can use the following workflow in order to implement properly the desired functionality in your app:
- Request a reset for the password of the user account programmatically as explained here
- After the email is received, set the new password in the form. Just as a good measure, open the link
a new incognito window of the browser.
I hope that this helps. Let us know if any issues arise.