aewing bef80c5bab feat: implement robust TokenManager for field app resilience
PRODUCTION CRITICAL: Enhanced token lifecycle management

Features:
- 3-tier storage (PB authStore → IndexedDB → localStorage)
- Continuous background token refresh (every 20 min)
- Exponential backoff retry queue for network failures
- Stale token fallback for offline operation
- Cross-tab sync via IndexedDB
- Never forces logout on token expiry
- Network recovery detection and auto-refresh

Changes:
- Created token-manager.js with TokenManager class
- Updated signin.html to initialize TokenManager on login
- Updated index.html to use TokenManager for all API calls
- Simplified token extraction logic (centralized in TokenManager)
- Removed manual localStorage token management
- Added proper cleanup on signout

Benefits:
- Users stay authenticated during network interruptions
- Tokens always warm (proactive refresh)
- Field app resilient to poor connectivity
- No unnecessary re-authentication prompts
- Works offline with cached tokens
2026-01-08 17:33:07 +00:00
2025-12-12 15:27:18 -06:00
2025-12-12 10:52:35 -06:00
2025-12-12 15:30:47 -06:00
2025-12-12 10:46:19 -06:00
2025-12-12 17:36:07 +00:00
2025-12-12 10:52:35 -06:00
2025-12-12 17:36:07 +00:00
2025-12-12 10:52:35 -06:00
S
Description
No description provided
Readme Apache-2.0 5.8 MiB
Languages
HTML 48.3%
TypeScript 32.2%
JavaScript 18.7%
Shell 0.7%