roos-fs tasks #564
openAdd Session Expiry Warning and Renewal Mechanism to Prevent Data Loss
0%
Description
A user reported that their session expired while they were actively working in the application. Specifically, while creating a new task template, they spent over 30 minutes discussing and making changes before attempting to save. Unfortunately, their session had expired, causing all progress to be lost.
The current behavior leads to user frustration and potential data loss when work is performed over longer periods of inactivity, even if the user is actively interacting with the interface.
Expected Behavior:
When a user’s session is about to expire, the system should proactively notify them and give an option to extend the session. This ensures that their current work can be saved without requiring a re-login.
Proposed Solution / Business Logic:
Session Expiry Warning:
When the session is about to expire (e.g., 1 minute before timeout), display a modal notification or banner with a countdown.
Example text:
“Your session will expire in 1 minute. Would you like to stay logged in?”
User Options:
- Proceed / Stay Logged In:
When clicked, the system sends a request to renew the session token and resets the session timer.
- No Action:
If the user does not respond before the countdown ends, the session expires as usual, and they are logged out.
Post-Expiration Handling:
If the user’s session expires, show a clear message:
“Your session has expired. Please log in again to continue.”
Acceptance Criteria:
- The system displays a session-expiry warning 1 minute before timeout.
- Clicking “Stay Logged In” renews the session and continues seamlessly.
- If the user takes no action, the session expires normally, and the user is logged out.
- The user is informed when the session actually expires.
- This feature works across application