laravellaravel-fortify

Laravel Fortify password reset link giving ArgumentCountError when clicked


Using Laravel 9 and Fortify, I can get a link sent by email that should enable the user to reset their password, as per the docs.

This link has the form /api/reset-password?token=yadayada&email=abc@example.com

However the backend responds with an error:

local.ERROR: Too few arguments to function Illuminate\Routing\RouteFileRegistrar::{closure}(), 0 passed in /home/dan/www/digisam/digisam-prm/vendor/laravel/framework/src/Illuminate/Routing/Route.php

The closure passed to Fortify:resetPasswordView() at boot is never called.

The route is registered:

php artisan route:list
...
  POST      api/reset-password ..........//............. password.update # Laravel\Fortify # NewPasswordController@store
  GET|HEAD  api/reset-password ..........//............. password.reset

but in the list, no controller or method is listed for the GET api as opposed to the POST. Not sure why, this is a fairly vanilla Fortify installation.

Any ideas for where to look next?


Solution

  • Turned out to be code in route/api.php that was not functional.