born05 / craft-twofactorauthentication

Craft plugin for two-factor or two-step login using Time Based OTP.
MIT License
36 stars 26 forks source link

I never see the 2-factor verification page #52

Closed petehjfd closed 3 years ago

petehjfd commented 3 years ago

Hi

I'm not sure if I'm missing something, but no matter what I do, I never see the 2-factor verification page. I just get logged in straight to the dashboard.

If I log out and log back in, I go straight to the dashboard. No 2-factor verification.

If I delete the user's record from the twofactorauthentication_user database table and try logging in again, I still go straight to the dashboard. No 2-factor authentication.

The user's record in the twofactorauthentication_user database table does not get recreated until I return to the plugin's settings page.

I have tried with both an admin account and a non-admin account.

I am testing locally at the moment, which I assume is OK? I can't think of anything else to try. Am I missing something?

Thanks!

Craft version: 3.6.11.2 (also tested with 3.6.6) Plugin version: 2.8.1

petehjfd commented 3 years ago

I've now also tried disabling dev mode, which didn't make any difference.

roelvanhintum commented 3 years ago

@petehjfd thanks! The verification is stored in the session. It looks like session is kept alive even after logout. I'll release a fix asap (today).

petehjfd commented 3 years ago

Thanks @roelvanhintum, that would be great!

roelvanhintum commented 3 years ago

@petehjfd before releasing, does the latest commit fix this for you? In composer this would be dev-craft-3.1 i think. I now store the login timestamp and compare this to the lastest login timestamp.

petehjfd commented 3 years ago

Yes, that seems to have done the trick!

roelvanhintum commented 3 years ago

Glad to hear! Thanks for testing! Released in 2.9.0