Skip to content

enhance: add session manager to view and revoke active sessions - #38909

Draft
a1012112796 wants to merge 1 commit into
go-gitea:mainfrom
a1012112796:zzc/dev/session_manager
Draft

enhance: add session manager to view and revoke active sessions#38909
a1012112796 wants to merge 1 commit into
go-gitea:mainfrom
a1012112796:zzc/dev/session_manager

Conversation

@a1012112796

Copy link
Copy Markdown
Member

Users can now view and revoke their active sessions from a new "Active Sessions" page under user settings. Sign-ins record the client IP, user agent, sign-in time and method, and sessions are indexed by user ID. The feature is off by default behind ENABLE_SESSION_MANAGER.

example view:

f99a4061ad22bd878c5d5b0f9bc48c81

blocked by: https://gitea.com/go-chi/session/pulls/13

Assisted-by: GitHub Copilot:DeepSeek V4 Pro

Users can now view and revoke their active sessions from a new "Active Sessions" page under user settings. Sign-ins record the client IP, user agent, sign-in time and method, and sessions are indexed by user ID. The feature is off by default behind ENABLE_SESSION_MANAGER.

Assisted-by: GitHub Copilot:DeepSeek V4 Pro
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 13, 2026
@wxiaoguang

Copy link
Copy Markdown
Contributor

I don't see how it address the "remember me" problem: how to make a user logout from its "remember me" sign-in.

Even the "remember me" is not strictly a "web browser session", it is still a kind of "user's login session".

@a1012112796

Copy link
Copy Markdown
Member Author

I don't see how it address the "remember me" problem: how to make a user logout from its "remember me" sign-in.

Even the "remember me" is not strictly a "web browser session", it is still a kind of "user's login session".

Now I store the "Remember me" token id in session when autoSigin (maybe need update too store it in sigin with creating token aslo)

image image

then, when revoke session, will delete it also. In my local test, it works.

image

In gitlab, Looks it will delete all token, wonder whether it's a better option or not.

image

https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/user/profile/active_sessions.md#revoke-a-session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants