• Resolved denis24

    (@denis24)


    I created a custom template for the email sent to users after they are imported. I removed the text with the password and instead included this:

    To maintain the security of your account, please create a new password here:
    **woocommercepasswordreseturl**

    However, when I click on that link in the email sent to a test user, I am sent to:

    https://basketsofafrica.com/wp/wp-login.php?action=lostpassword&error=invalidkey

    with the alert:

    “Your password reset link appears to be invalid. Please request a new link below.”

    I thought this might be because I was already logged in to the site as an admin, so I cleared cookies in my browser (Chrome) and quit it before clicking the link in the email. But I still get the invalid key message above.

    The same thing happens when I use **passwordreseturl** instead of the WooCommerce link.

    Why is this happening?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Javier Carazo

    (@carazo)

    @denis24,

    Key is being badly generated.

    It is calculated in this way:

    $user_data = get_user_by( 'ID', $user_id );
    $reset_key = get_password_reset_key( $user_data );

    Using standard functions as you can see.

    This is really strange, user is correctly generated?

    Thread Starter denis24

    (@denis24)

    Thanks for your quick reply. I’ve got it working now.

    When it didn’t work with **passwordreseturl** I edited the email template to use **woocommercepasswordreseturl** instead.

    Later I realized that I had to click the button “Load subject, content and attachment from this email template” in Import users/Mail Options AGAIN to use the updated version. (Suggestion: include a note to users to do this.)

    Now the plugin is sending the correct link with the correct key. I haven’t tested it with **passwordreseturl** again, though.

    • This reply was modified 5 years, 7 months ago by denis24.
    • This reply was modified 5 years, 7 months ago by denis24.
    Plugin Author Javier Carazo

    (@carazo)

    All is solved?

    Hi Javier,
    I’m having the same issue when using the **passwordreseturllink** or **passwordreseturl**
    I tried sending it to myself with the “send test email” and also tried with a new user account. Both resulted in this message:
    “Your password reset link appears to be invalid. Please request a new link below.”
    Any ideas?

    Plugin Author Javier Carazo

    (@carazo)

    @veroquint523,

    Maybe some kind of problem with a cache? This is strange because the link is generated and sent directly in the email and no cache should work there.

    Also maybe you take too much time to try the link? Or are you doing it fast?

    I am clicking on the link within seconds of receiving the email.

    Plugin Author Javier Carazo

    (@carazo)

    If you ask for a password link to WordPress (without using this plugin), does it work?

    Yes, If I use the ‘get a new password’ link from the login page, it sends me a new password reset link that works.

    Plugin Author Javier Carazo

    (@carazo)

    @veroquint523,

    I have tested in different sites, and it is working.

    I cannot debug an error I cannot see.

    That’s unfortunate. But thank you for looking into this.

    Plugin Author Javier Carazo

    (@carazo)

    Do you see any differences between WordPress recover password link and the generated by this plugin?

    Have you tried to deactivate other plugins?

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Invalid password reset link’ is closed to new replies.