Monitoring expired sessions#2590
Conversation
. logic to check session check action redirect on login page reuse api new epic gnCheckSession on action LOCATION_CHANGE, new constant LOGIN_URL notification with button new config var checkSessionInterval
rm debug
added test for check session added test for check session test second notif notify on cancel refact Monitoring Comp as Container
There was a problem hiding this comment.
Code Review
This pull request introduces background session monitoring to detect server-side session expiration and prompt the user to log in again. It adds new actions, epics (gnMonitorLogin, gnCheckSession), a MonitoringDialog component, and corresponding translation keys across multiple locales. Feedback on the changes highlights two critical issues: first, the goToLogin callback in MonitoringDialog.jsx may receive non-string arguments (such as event objects) when triggered by UI components, which would corrupt the redirect URL; second, using switchMap for START_LOGIN_MONITORING in security.js resets the session check timer on every page navigation, potentially preventing the check from ever running. Replacing it with exhaustMap is recommended to ensure the interval persists across navigations.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
c8782e5 to
b168ec3
Compare
7fe60ee to
5e08ff1
Compare
The PR implement a new polling in 2 new epics in
epics/security.jsto check user session valid usinggetUserInfo()callIntroduce new monitoring container(in all routes) to show Dialog to inform user to go in login page:
The polling time interval can also be chosen through the new
GEONODE_SETTINGS.CHECK_SESSION_INTERVALoption which defaults to 15 minutes. Use 0 value to disable the polling.Peek.2026-06-26.16-33.mp4
Peek.2026-06-26.16-32.mp4
How to test:
open 2 window in both logged as same account and go logout in one.
The second window after some show the new Dialog to go in login page or cancel.
PS. to speed up tests change default value on
checkSessionInterval in https://github.com/stefanocudini/geonode-mapstore-client/blob/issue_detect-session/geonode_mapstore_client/client/js/epics/security.js#L42