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

"Keep me logged in" checkbox #340

Open
Naviary2 opened this issue Nov 21, 2024 · 0 comments
Open

"Keep me logged in" checkbox #340

Naviary2 opened this issue Nov 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Naviary2
Copy link
Member

Naviary2 commented Nov 21, 2024

With the latest addition of session renewal for as long as you are active, this is as perfect at time as ever to add a checkbox on the login screen "Keep me Logged In".

If this box is checked when the user clicks login, it will include that boolean when it sends the login credentials.

On the server-side, we reduce the expiry time of session tokens to a few days (located in config.js), and we add another variable for storing the duration of "extended sessions", which will last six months (if never renewed). If this "keep me logged in" boolean is present, loginController.handleLogin() will pass that as an argument to createNewSession(), which should trigger it to use the longer expiry time when issuing the new session.

Generated session tokens inside refreshTokenObject.addTokenToRefreshTokens() also need to store this boolean of whether or the session is of the extended type. When the session is renewed within sessionManager.renewSession(), we renew it for the same six months if that boolean is present on the session token.

@Naviary2 Naviary2 added the enhancement New feature or request label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant