Fix logout hanging issue by routing through AuthController#26
Draft
Fix logout hanging issue by routing through AuthController#26
Conversation
Co-authored-by: danjohn007 <77515822+danjohn007@users.noreply.github.com>
Co-authored-by: danjohn007 <77515822+danjohn007@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix logo redirect and session logout issues
Fix logout hanging issue by routing through AuthController
Oct 11, 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
The system had a critical issue where clicking "Cerrar Sesión" (logout) would cause the application to hang indefinitely with a loading state, preventing users from successfully logging out. This was a regression from previous versions where logout worked correctly.
Root Cause
The logout link in the navigation header was pointing directly to
PUBLIC_URL/logout_extremo.php, which bypassed the application's router and session management infrastructure. This direct file access caused issues with proper session cleanup and resulted in the hanging behavior.Solution
Changed the logout link to use the router-based endpoint
/logout, ensuring it goes throughAuthController::logout()which handles session cleanup properly:This minimal one-line change ensures:
Files Changed
app/views/layout/header.php(line 185) - Updated logout link to use routerTesting
Additional Notes
The logo link was also verified and is working correctly - it already redirects to the home page (
BASE_URL . '/') and displays the welcome message properly for both logged-in and logged-out users. No changes were needed for this functionality.This fix follows the same proven pattern used by the login functionality and ensures consistency across all authentication-related actions in the application.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.