-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
🚀 [Feature]: missing session SessionOnly (cookie) #2145
Comments
Refer to https://stackoverflow.com/questions/14196671/session-only-cookies-with-javascript and It should be a front-end FEATURE. |
No, it can be done via backend. |
You can't unset it. A value of zero is not the same |
Hello can I jump in and help? |
Sure. You can create a PR |
* feature: session only for zero expire cookie #2145 * refactor condition to set MaxAge and Expire on cookie * move checking zero maxage and expire in session middleware Signed-off-by: Yves Tumushimire <[email protected]> * feature: session only for zero expire cookie #2145 * refactor condition to set MaxAge and Expire on cookie * move checking zero maxage and expire in session middleware Signed-off-by: Yves Tumushimire <[email protected]> * CR changes * some updates --------- Signed-off-by: Yves Tumushimire <[email protected]> Co-authored-by: Muhammed Efe Çetin <[email protected]> Co-authored-by: René Werner <[email protected]>
Feature Description
See: https://pkg.go.dev/github.com/gofiber/fiber/[email protected]/middleware/session#Config
There seems to be no option to set SessionOnly.
See: https://pkg.go.dev/github.com/gofiber/fiber/v2#Cookie
SessionOnly deletes the cookies when the user closes the browser window.
If you set Expiration to 0, it deletes it immediately.
There is also ambiguity: Does
Expiration
refer to how long the data is stored in the session data or how long the cookie lasts for?Additional Context (optional)
No response
Code Snippet (optional)
No response
Checklist:
The text was updated successfully, but these errors were encountered: