Closed
Description
- Laravel Version: 11.44.1
- Nova Version: 5.4.3 (Silver Surfer)
- PHP Version: 8.4.6
- Database Driver & Version: N/A
- Operating System and Version: N/A but macOS 15.4
- Browser type and version: N/A but Firefox 139
- Reproduction Repository: N/A
Description:
The Nova Authenticate
middleware will fetch the customised Nova guard from the config before running its checks.
$guard = config('nova.guard');
// ...
return parent::handle($request, $next, ...$guards);
The Nova RedirectIfAuthenticated
does not do this, which leads to a loop, e.g. /nova
-> /nova/login
-> /nova
-> ...
Detailed steps to reproduce the issue on a fresh Nova installation:
- Set up an additional authentication guard using a copy of
web
, so you haveweb
then the new guardnova
- Set
NOVA_GUARD=nova
in.env
- Set the Nova login route to use the
nova.guest
middleware - Try to access
/nova
and you should see the loop