born05 / craft-twofactorauthentication

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

Session duration #23

Closed drifteaur closed 5 years ago

drifteaur commented 5 years ago

The plugin will fail if userSessionDuration is set to 0 or false in the general.php config. I'm getting:

Exception: DateInterval::__construct(): Unknown or bad format (PT-1S) in .../vendor/born05/craft-twofactorauthentication/src/services/Verify.php:52

If I set userSessionDuration to a positive number, it works.

roelvanhintum commented 5 years ago

@drifteaur Setting userSessionDuration to 0 causes the session to be handled without a record in the database. We need that record to handle 2FA, and determine when verification is needed again.