Forgot Password - Success Message/Flash Message after setting new password on the login screen Quick question about password reset (forgot a password on the front-end)
So I have set my
'setPasswordSuccessPath'           =&gt; 'login'
so that when the new password is set, they will be taken to this login screen.
Is there anyway i can detect this has come from this process, so I can show a little flash message to confirm their password has been reset? I'd like to give some visual feedback, without a whole separate interim page.
The way I handle this is by simply includeing the same template as the login page and passing a Twig variable along with it.
So more specifically, my setPasswordSuccessPath is set to a unique template called password-was-reset, which has the following code in it and nothing else:
{% include 'login' with { passwordWasReset: true } %}
You can then read that variable in your login template like this - as you can see I'm also doing the same thing with my account activation template:
    {% if passwordWasReset is defined and passwordWasReset and errorMessage is not defined %}       
        &lt;p&gt;Your password was reset successfully. Please login below.&lt;/p&gt;        
    {% endif %}

    {% if accountWasActivated is defined and accountWasActivated and errorMessage is not defined %}
        &lt;p&gt;Your account was activated successfully. Please login below.&lt;/p&gt;
    {% endif %}

    ...

    &lt;login form here&gt;