Problem/Motivation

If the website send the link "[user:one-time-login-url]/login" in the reset pass email configuration, this is not the route "user.reset" but the route "user.reset.login" that is used.

In this particular case, the module "shy on time" does not work.

Proposed resolution

Change the following condition in the event subsriber:

if ($request->attributes->get('_route') === 'user.reset') 

With:

if ($request->attributes->get('_route') === 'user.reset' || $request->attributes->get('_route') === 'user.reset.login' ) 
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

davidpetit created an issue. See original summary.

davidpetit’s picture

I commited and pushed the fix in the issue fork + merge request.

dennisdk’s picture

Confirmed working as expected!
Also needed for our use-case where email clients will use this login link, making it expire.

idebr’s picture

Title: The route user.pass.login should also be taken into account » The route user.reset.login should also be taken into account
Version: 2.0.3 » 2.0.x-dev
Category: Bug report » Task
Status: Active » Reviewed & tested by the community

merilainen made their first commit to this issue’s fork.

merilainen’s picture

StatusFileSize
new800 bytes

Here is an improved patch which doesn't call the get() multiple times. Same logic applies so I will leave it at RTBC.
Updated also the MR.

  • 41888d47 committed on 2.0.x
    Issue #3487126: The route user.reset.login should also be taken into...
zcht’s picture

Thank you very much for the logical finding, it is committed.

zcht’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.