DarkGhostHunter / Laraguard

"On-premises 2FA Authentication for all your users out-of-the-box
MIT License
266 stars 24 forks source link

Not prompted for 2FA on login #40

Closed maciekish closed 4 years ago

maciekish commented 4 years ago

Hi, i just added your package to my Laravel 7 installation on PHP 7.4. I added the Contract and Trait to my User model, ran the migration and published the config without any changes.

I was able to sucessfully generate and confirm my 2FA code and $user->hasTwoFactorEnabled() returns true.

But when i log out and try logging back in again, i'm logged in without any request for a 2fa code! I can log in using the password only.

What have i missed?

maciekish commented 4 years ago

I finally figured out that i had to add DarkGhostHunter\Laraguard\LaraguardServiceProvider::class to my providers in app.php. I believe Laravel is supposed to auto-load these, no?

DarkGhostHunter commented 4 years ago

No problems on my end. You may have package discovery disabled in your composer file.