-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Remember me" feature #1316
"Remember me" feature #1316
Conversation
… the user selected "remember me" when logging in
Your Testserver will be ready at https://1316.test.live.mm.rbg.tum.de in a few minutes. Logins
|
A 180-day session lifetime is way to long. I think one to two weeks is perfectly fine for a VoD platform. We are already storing the cookie, so naming it "Remember Me" is a bit misleading. It is typically used when you want to use a session cookie, and a persistent cookie (with an expiration date). A few examples: TIDAL does not have a "Remember Me" toggle and stores a sid cookie with a lifetime of 7 days. |
Why do you think a 180-day session is too long? |
Thank you for the comments! As it comes to security, I do think we should be more careful. But some thoughts on how a "remember me" feature, realised by refreshing the token for logged-in users from time to time, would actually improve security: With this feature, we can then shorten the default duration of validity of the token, or, provide an option to shorten it (lecturers and admins might want this behaviour). And we are using jwt instead of a session cookie, which makes a great difference, since invalidating a jwt before its expiration is more tricky. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this feature is no longer necessary as we are currently switching to another login system
Motivation and Context
Related issue: #1302
Description
MaxTokenLifetimeWithRememberMeInDays
is set, to prevent the token from being valid foreverMinUpdateIntervalInHours
is set, so that (if "Remember Me" checked upon logging in) the token won't get refreshed too frequentlySteps for Testing
MinUpdateIntervalInHours
in "\tools\middlewares.go" to a smaller value, e.g. 0.01, which corresponds to 36 secondsMinUpdateIntervalInHours
, see the cookie remain unchangedMinUpdateIntervalInHours
, see both the value and the Max-Age of the cookie "jwt" is changed, and in the payload of jwt, the value of "exp" corresponds to the Max-Age of the cookieScreenshots
Change of UI:

