Password reset not working

Created on 3 May 2024, 10 months ago

Problem/Motivation

When users want to reset their password, they still have to enter their TFA verification code. But after doing so they are not redirected to the user/x/edit page but to the homepage of the website. Therefor they are not able to change the password without having to know their old password when going to the user account manually.

I'm using the login_destination module that might have to do something about this. I created a special one-time-login destination but this doesn't work. What can I do to solve this?

πŸ› Bug report
Status

Active

Version

1.7

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands zebda

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @zebda
  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    Most modules I have seen do this have special handling for the password reset route and login_destination appears to be no different https://git.drupalcode.org/project/login_destination/-/blob/5ba35c477e9b...

    We did see similar with https://www.drupal.org/project/tfa/issues/3108099#comment-15337414 ✨ Redirect to validation setup after login without tfa Needs work , while not the same code it is inherently the same problem, a 3rd party module is changing the destination after we have set a destination.

    For now my suggestion would be to disable the login_destination module to allow Password Resets to function.

    On cursory thoughts I can not think of a way we can avoid all of these redirect modules not having some issue that needs to be coded for on their side without a new API being added to core.

    I'm moving this issue to login_destination as it is that module code that is changing the destination redirect.

  • πŸ‡ΊπŸ‡ΈUnited States davisben NH

    I ran ran into this issue also. I got it working by checking if a pass-reset-token query parameter exists, and if so, ignore any configured destinations. This is almost certainly not a fix that covers all use cases, but I'm posting the patch in case it's helpful to anyone else.

  • Same issue, applied patch in #3 and it works great!

  • πŸ‡¬πŸ‡§United Kingdom somersoft

    Applied paychin #3 and it worked for me too.

  • πŸ‡¨πŸ‡­Switzerland redzeuf Geneva

    This patch #3 works but it does goes through the TFA verification before redirecting. It mean that anybody asking for reset password can directly be identified if he get the reset URL.

Production build 0.71.5 2024