Once upon a time, you can just configure this in config.yml
fos_user: resetting: token_ttl: 0
but in recent versions, since token_ttl and retry time and token lifetime, if you set it to 0, as soon as you create it, it expires.
You can complete the question on Github
If you need it to be fixed as possible as a hacker workaround , you can implement resetAction() by inserting vendor/friendsofsymfony/user-bundle/Controller/RegistrationController.php into your AppBundle (or any package that actually matters) and force the router to point to your overriden function, for example this (routing.yml):
fos_user_resetting_reset: path: /resetting/reset/{token} defaults: {_controller: AcmeUserBundle:Resetting:reset }
Now, in your resetAction() method, you can comment on these lines:
// if (null !== $event->getResponse()) { // return $event->getResponse(); // }
There are less hacker methods, of course, like creating your own listener, but ... I did it quickly and dirty, as I was in a hurry, and I already had the redirect reset.
source share