Conversation
Introduces a lightweight API endpoint to verify if the current session is still valid. This endpoint is utilized by the frontend to detect session restoration after expiration, returning a 200 status for valid sessions and a 401 status for expired sessions.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Comment |
Can’t close/remove Session Expired window when logging in from another window The user need to log off from another window to be able to log in and bypass this window.
tarekio
approved these changes
Sep 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a user's session expires and they get a "Session Expired" dialog, if they log back in from another tab, the dialog gets stuck and can't be dismissed.
Solution
Check if session is restored when user focuses back on the tab with the stuck dialog.
Backend (Already Done) ✅
New endpoint available:
Frontend Implementation
File to modify:
/enferno/static/js/mixins/reauth-mixin.jsStep 1: Add session check method
Step 2: Start listening when dialog shows
Step 3: Stop listening when dialog closes
How It Works
focusevent)/admin/api/session-checkTesting
That's it! Simple focus-based solution that preserves user work and requires minimal code changes.