-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Auto sign-out #4107
Comments
can someone tell me about the DB structure and a bit of the API documentation? my plan to implement this is to store the last-login-time and log-out-after data in the db and check if the curr-time subracted from the last-login time is greater than the log-out-after time and log out the user based on that. we can add the UI for setting the "log out after time" in the preferences page. |
@JodhwaniMadhur I think the point of this issue is to make the access token duration configurable, which is now 1 week by default. https://github.com/usememos/memos/blob/main/server/router/api/v1/auth.go#L18 |
oh ok, thanks for the guidance, will make the feature work this way. |
To add to @johnnyjoygh 's comment. I believe there are 2 places to take into consideration. At registration the expiry is set to 7 days in the future, subsequent logins set the expiry 1 year in the future. |
I found the reference to the two locations #4009 (comment) |
@JodhwaniMadhur, out of interest, how are you intending to capture a large range of timeout possibilities? Current timeout is in days (multiplied for years), OP seems like they need timeout in minutes |
Discussed in https://github.com/orgs/usememos/discussions/4075
Originally posted by rathmannm October 31, 2024
Hi,
I'm storing sensitive contents in Memos so it would be nice to have an auto sign-out feature where you can specify after how many minutes you get signed out automatically.
The text was updated successfully, but these errors were encountered: