mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 18:44:05 +02:00
The deployed app looped /login -> / -> /login forever: Login sees a valid Supabase session and navigates to /, the global FolderProvider pulls GET /api/v1/storage/folders, the backend rejects it with 401, and the global error handler hard-redirects back to /login?from=/bpp. fileSyncService's /api/v1/storage/files pull already opts out via suppressErrorToast + skipAuthRedirect, so its 401 fails silently; folderSyncService.list() passed neither flag, so its 401 fell through to the redirect. Add the same flags - FolderContext.pullFromServer already handles 4xx locally (flips serverReachable, suppresses the banner). Note: the underlying 401 on /api/v1/storage/* with a valid session is a backend/deployment issue (storage endpoints rejecting the Supabase token); this change makes the frontend resilient so it degrades to "folder sync unavailable" instead of an auth loop. Co-Authored-By: Claude Opus 4.8 <[email protected]>