Closed CodeWithDennis closed 2 years ago
Hi
Did you add middleware to nova config
\Visanduma\NovaTwoFactor\Http\Middleware\TwoFa::class
Yes, i did.
Edit: I even tried again from scratch and when i logout and login im not getting any prompt/view.
I'm unable to reproduce the issue. please make sure Nova Two factor is
1) Enabled by config (.env) 2) Enabled by Nova dashboard settings
Edit:
When i dumpdie
in the middleware it does pass through it so thats a good thing.
Did all those, see screenshots.
All things looks good.
Please make sure User model has used Visanduma\NovaTwoFactor\ProtectWith2FA
trait
Also try to remove old 2fa record from database table
I also have that, im really confused whats going on. Can it be conflicting?
it may not conflicting with others but i guess this issue is related to middleware. let's try to find out what's going on.
try to diedump following things before first if
condition in middleware
auth()->user()->twoFa
Hi,
I made a small clip for you to check i hope it helps:
[removed link]
Thank you for clip. we tried with two fresh Nova 4 projects & it still work without any issue.
unfortunately i'm unable to reproduce the issue as yours. if you have any special environment setup please let me know. for further support you can contact us directly via info@visanduma.com
Alright, thanks for trying ill take a deeper look on my end what might be going on.
Alright, thanks for trying ill take a deeper look on my end what might be going on.
Hi, I'm experiencing. No prompt for 2FA.
I will try clearing the caches.
I run the following commands:
artisan config:cache
artisan optimize:clear
now fixed
I run the following commands:
artisan config:cache
artisan optimize:clear
now fixed
I tried your fix but still not getting a prompt.
You could verify if any middleware codes are executed.
I tried using dd
or try to Log
messages.
Before I clear the caches, they are not executed.
It seems like it will never ask for my OTP when logging in. Am i missing something?
if (auth()->guest() || $authenticator->isAuthenticated()) { return $next($request); }
Looks like something here maybe?