feat: Update PWA service worker for authentication

- Add authentication pages to static cache (/auth/login, /auth/register, /auth/error)
- Implement special handling for authentication API requests (network-only with offline error)
- Add authentication page caching strategy (cache-first with network fallback)
- Prevent caching of authentication errors (401, 403)
- Enhance offline page with online detection and auto-redirect
- Add authentication notice to offline page
- Update cache version to v2 for proper invalidation
- Create PWA_AUTH_GUIDE.md documentation

Task: 19. Update PWA service worker for authentication
Requirements: 4.4
This commit is contained in:
2025-12-02 01:34:28 +00:00
parent 534796edd7
commit 0e609af924
4 changed files with 327 additions and 26 deletions

View File

@@ -264,7 +264,7 @@
- [ ] 18. Checkpoint - Ensure all tests pass
- Ensure all tests pass, ask the user if questions arise.
- [ ] 19. Update PWA service worker for authentication
- [x] 19. Update PWA service worker for authentication
- Handle authentication errors in offline mode
- Cache authentication-related pages appropriately
- Update manifest if needed