Files
ocis/web/packages
dj4oC ac399eb8d8 fix(web): keep session on transient network errors during context init
The web frontend (now maintained in this monorepo under web/) re-establishes the
authenticated context on page reload by calling updateContext(), which fetches user
data over HTTP. Previously any error thrown there - including transient connectivity
failures (ERR_NETWORK, timeouts, fetch TypeErrors) - was treated like an expired or
invalid token, forcing a logout and redirect to the access-denied page. This adds an
isNetworkError() classifier so connectivity failures preserve the existing session,
while genuine auth rejections (carrying an HTTP response such as 401) still trigger
the existing logout flow. Applies to the page-reload token-restore path and the
addUserLoaded handler.

Ports the fix for owncloud/web#12980 (originally owncloud/web#13941; owncloud/web is
deprecated and development moved into this repo).

Signed-off-by: dj4oC <noreply@github.com>
2026-07-09 19:09:11 +00:00
..