Commit Graph

8 Commits

Author SHA1 Message Date
Nathan
3fc1975a9d chore: organize test 2025-11-17 12:12:56 +08:00
Nathan
562456a757 chore: lint 2025-11-16 20:34:46 +08:00
Nathan
c3d6ef7f31 fix: Fixes three critical race conditions that caused redirect loops after OAuth login:
1. Clear old token before processing OAuth callback to prevent axios
      interceptor from attempting auto-refresh of expired old token while
      processing new OAuth tokens

   2. Add multi-stage authentication checks in AppAuthLayer with proper
      timeouts to wait for React state sync before triggering logout

   3. Add proactive state sync in AppConfig to ensure isAuthenticated
      state matches localStorage token on mount

   4. Create AppWorkspaceRedirect component to handle /app -> /app/:workspaceId
      navigation after OAuth callback, preventing undefined workspace errors
2025-11-16 20:20:58 +08:00
Nathan
f35914baa1 chore: add test 2025-11-16 15:03:06 +08:00
qinluhe
f553e31e4e chore: fix login redirect 2025-10-14 17:33:12 +08:00
nathan
c6a92d96e7 chore: add login logout test 2025-10-02 16:03:47 +08:00
nathan
725d8ed0f7 chore: lint 2025-10-01 19:29:32 +08:00
nathan
6cc6d05384 test: login test 2025-09-27 14:19:02 +08:00