born05 / craft-twofactorauthentication

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

userSessionDuration not being kept with 2FA #66

Closed Coysh closed 1 year ago

Coysh commented 2 years ago

We have userSessionDuration set to 7 days for a few reasons. With 2FA installed, it seems like this has changed to 1 hour (best guess).

Any ideas? Is this intentional?

roelvanhintum commented 2 years ago

This is definitely not intentional, but sounds similar to other issues. see: #63 Are you using redis for session storage?

Coysh commented 2 years ago

@roelvanhintum - yep, using redis. #63 looks like a similar problem, but do think it's longer than 10 minutes

Coysh commented 1 year ago

Hi @roelvanhintum - still having this issue. It may be more like 10 minutes. Any ideas?

roelvanhintum commented 1 year ago

@Coysh is it similar to whatever your session.gc_maxlifetime is set to? The Servd blog post https://servd.host/blog/craft-yii-and-redis-session-absentee says it's about 10-30 minutes. Since the 2FA plugin doesn't do anything with the session, besides storing some data, it must be hosting related.