AletheiaFact / AletheiaFact/aletheia

Bug: Frequent session timeouts affecting user experience

Abierto
#2,385 0 comentarios 0 reacciones 1 asignado Reclamado por @caneppelevitor Ver en GitHub
bug p1
Lenguaje dominante
TypeScript
Estrellas
55
Forks
20
Merge medio
2 d 6 h
PR fusionados (30 d)
2

Descripción

### Background Information
Users are experiencing frequent, involuntary logouts that severely disrupt the user experience and operational efficiency. This issue prevents checkers from completing critical tasks, such as assigning reviewers or crosscheckers to their reports.

A key observation: even after being logged out, clicking "Login" often redirects the user immediately back to the `/profile` page without requiring credentials again. This suggests that while the authentication token might still exist, the application fails to maintain a persistent "logged-in" state during navigation or page refreshes.

### Steps to Reproduce
Due to the intermittent nature of this bug, there is no single fixed path to reproduce it, but it typically occurs by:
1. Navigating between different modules/pages within the platform.
2. Performing consecutive page refreshes (F5).
3. Interacting with report action buttons (e.g., trying to add a reviewer).

### How (Proposed Investigation)
* **Session Persistence:** Investigate the token validation logic and ensure the session state is correctly synchronized between the frontend and the auth provider.
* **Middleware/Route Guard:** Check if the private route guards are triggering a logout due to a race condition during page loads.
* **Token Storage:** Verify if the access token is being prematurely cleared from local storage or if the `exp` (expiration) claim is being handled incorrectly.

### Expected Behavior
The user session should remain active and stable across all pages and during manual refreshes, as long as the token is valid. The system should only log the user out upon an explicit "Logout" action or a genuine session expiration.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.