AletheiaFact / AletheiaFact/aletheia

Bug: Frequent session timeouts affecting user experience

未关闭
#2,385 0 条评论 0 个 reaction 已指派 1 人 已被 @caneppelevitor 认领 在 GitHub 查看
bug p1
主要语言
TypeScript
星标
55
派生
20
平均合并
2 天 6 小时
30 天内合并 PR
2

描述

### 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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。