alexedwards / scs

HTTP Session Management for Go
MIT License
2.09k stars 166 forks source link

Set lifetime per session #73

Closed eduardhasanaj closed 4 years ago

eduardhasanaj commented 4 years ago

Hi, I have been using scs for some time and it looks great. I hava a concern why I cannot set lifetime per session. Is there any worrkaround?

alexedwards commented 4 years ago

Hi,

Do you mean so that one user has a shorter session lifetime (like one hour) and another user has a longer session lifetime (like one day), but while using the same scs.SessionManager instance?

If yes, could you describe the reason behind wanting to do this?

eduardhasanaj commented 4 years ago

Hi @alexedwards I want to have a remember me option and in this case the session lifetime can be up to 30 days. In the other hand, when this option is unchecked, the session lifetime will be short. I do not want to create different instances of session manager as it makes it harder the session check.

alexedwards commented 4 years ago

Thanks for confirming. I think this is a duplicate of https://github.com/alexedwards/scs/issues/71 so I'm going to close this one.