Skip to content
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

Automatic renewal for sessions #281

Open
1 task done
canidam opened this issue Jul 26, 2024 · 0 comments
Open
1 task done

Automatic renewal for sessions #281

canidam opened this issue Jul 26, 2024 · 0 comments

Comments

@canidam
Copy link

canidam commented Jul 26, 2024

Is there an existing feature request for this?

  • I have searched the existing feature requests

Is your feature request related to a problem? Please describe.

I've a web app protected by a login system. Clients log in, and I keep their status / identity in a session cookie.

Today the maxAge is set to 30 days by default, allowing the user to update CookieStore with MaxAge method.
This means users will have to re-login a system after 30 days, even if they browse the site daily.

Describe the solution that you would like.

Add a "automatic cookie renewal" functionality to allow the library renew cookies that are about to expire.

For example, a cookie is created with max age of 30 days. If the server sees a cookie that is about to expire in ~3-4 days, it renews itself by simply copying the session data to a new cookie with an updated maxAge of 30 days.

In scenarios where a user is not active for 30 days, and the cookie expires, they will need to re-login the system.

Describe alternatives you have considered.

Implementing this login in a middleware, but it is easier to do in the store itself.

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant