WordPress reset password returns invalid key

I had the same issue with this, I assume you’re working from this guide – https://code.tutsplus.com/tutorials/build-a-custom-wordpress-user-flow-part-3-password-reset–cms-23811

Have a look at the actual reset password form where it shows pass1 and pass2. The hidden fields values are automatically set to $attribute['key'] and $attribute['login'].

Changing this to $_REQUEST['key'] and $_REQUEST['login'] should solve the issue.

Hope this helps.