Aakash - Auto log out user when session ends - #82
Conversation
✅ Deploy Preview for juno-dashboard ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Greptile SummaryThis PR implements automatic session expiry detection and enforced logout for the Juno Dashboard. When a user's JWT expires, the next window focus event triggers a background check against Key changes:
Areas needing improvement:
PR Checklist score: 82/100
Confidence Score: 5/5Safe to merge — all remaining findings are P2 style/improvement suggestions with no correctness or data-integrity impact. The core session-expiry detection and enforced logout flow is logically correct. The middleware already guards initial navigation, the focus listener correctly handles the mid-session expiry case, and src/components/providers/SessionProvider.tsx — focus listener debouncing and error feedback for the logOut function. Important Files Changed
|
Closes #80
When a user's session ends, they're shown an unclosable alert dialog asking them to log out. We recheck the session status every time the window is focused on.
Video Demo:
Screen.Recording.2026-03-31.at.1.35.29.PM.mov
As a logged in user, I delete the JWT in dev tools to simulate the session ending, and the alert dialog shows up.