Closed michelschilder closed 1 year ago
When I add 'web' to the middleware, I get one step closer and can fill in the 2fa-string.
'middleware' => [
'web',
\Visanduma\NovaTwoFactor\Http\Middleware\TwoFa::class
],
After that it's redirecting to 'nova-vendor/nova-two-factor/authenticate' with an 403 forbidden.
It's looks like 2FA middleware conflict with another one. Could you share the full error message with the file name and line numbers?
FIXED
I created a new plain laravel project, with nova and the two-factor. And it does work!
I saw some differences in the /config/nova.php file.
With these in the config it does work. Also in my existing project now.
'middleware' => [
'web',
HandleInertiaRequests::class,
DispatchServingNovaEvent::class,
BootTools::class,
\Visanduma\NovaTwoFactor\Http\Middleware\TwoFa::class
],
'api_middleware' => [
'nova',
Authenticate::class,
Authorize::class,
],
I am glad to know that you found a way to solve the issue
When I add ( /config/nova.php )
any request is redirecting to /admin/login with the following error:
InvalidArgumentException View [app] not found. http://127.0.0.1:8000/admin/login
By disabling the middleware in /config/nova.php it works again, but of course without 2fa enabled.
2fa (enable/disable) page in nova is working fine though.
What am I doing wrong?