Comments (5)
from sessions.
Yes, I outlined that approach as a possible reason, I'm just not sure why that would be used as it seems like bad practice to change session's duration individually (along with not bothering to store these unique durations). That would lead to a testing nightmare and the purpose of logging accounts in/out is better served without setting lifespans unique to each session cookie.
I assume the original author had a specific use-case in mind, but perhaps it was just convenience for setting the cookie options.
from sessions.
from sessions.
I do think it’s a legitimate use-case to expire sessions; or set a session
cookie that only lives for that browser session based on user input
(“remember me”).
I agree they are legitimate needs, but those are usually handled in a different way than setting different session cookie timestamps for each user. Expiring session cookies can be done universally with a single Max-Age set to 0 (or negative) and doesn't need to be tracked in all fifty thousand user sessions instances. Likewise, "remember me" functionality is generally handled by a separate cookie, not a parameter stored in the users current session. In fact, sessions are usually stored server side and culled after X time periods regardless of what the client cookie says.
from sessions.
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days.
from sessions.
Related Issues (20)
- [feature] Provide a method to delete/reset an existing session HOT 1
- deleted HOT 1
- Can two different controllers in two different files reference the same session object successfully? HOT 8
- Session doesn't cleanup HOT 3
- [question] How can I logout of a user from all other sessions except current one
- flash messages are not lost and are always saved when using gorilla mux HOT 4
- [bug] "More Examples" link in readme just links back to this repo HOT 1
- [question] Is there a way to store session data in file system and not in cookie HOT 1
- A question about deleting sessions HOT 3
- Changed auth/encryption key prevents the signed in user from accessing the webpage again HOT 17
- ⚠️ The Gorilla Toolkit is Looking for a New Maintainer HOT 2
- [feature] Add method to get cookie (to be used for request in tests) HOT 2
- SameSite is not set in the default path HOT 2
- Saving OAuth2 pointer in sessions HOT 1
- redigo: get on closed pool HOT 4
- securecookie: error - caused by: gob: name not registered for interface: "map[string]map[int]string" HOT 3
- [BUG] FilesystemStore MaxAge==0 does set cookies that expire when browser closes HOT 5
- Session still exists after setting MaxAge = -1 HOT 1
- [FEATURE] <Adding support for Partitioned attribute for 3rd Party Cookie deprecation> HOT 3
- FilesystemStore is vulnerable to directory traversal attacks HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sessions.