fix(auth): resolve race condition causing files not to load on initial visit

The cached-user-data path in checkAuthentication() fired resolveHomeFolder()
and loadFiles() concurrently with refreshUserData() using non-blocking .then()
chains. When the session cookie was expired, the folder/file API calls received
401 errors before the session could be refreshed. Now awaits session validation
before loading files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jared Wolff
2026-03-06 13:01:08 -05:00
parent 9aa35aa0ea
commit 5b5a9173bc
3 changed files with 44 additions and 37 deletions
+1 -1
View File
@@ -674,4 +674,4 @@ async fn oidc_exchange(
);
cookie_auth::append_csrf_cookie(response.headers_mut(), auth_response.expires_in);
Ok(response)
}
}