Admin: gebruikerslijst blijft actueel, sessie blijft behouden bij tijdelijke refresh-fouten

- Refresh wist de sessie alleen nog bij 400/401/403; 429/5xx/netwerkfout behoudt hem (opstart: rustig opnieuw proberen met backoff, anders gast zonder het cookie te raken)
- Refresh is single-flight (opstart, 401-interceptor, profiel delen een lopende aanvraag)
- GET-verzoeken met cache: no-store; gebruikerslijst: refetch bij focus en poll 45 s; sessie ververst als de eigen rol in de lijst afwijkt

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 13:32:46 +01:00
co-authored by Claude Sonnet 5.5
parent 2cdcb9d868
commit 2f3f7fbb2f
11 changed files with 299 additions and 15 deletions
@@ -21,7 +21,7 @@ export function useUpdateProfile() {
mutationFn: (data) => api.put<UserListItem>('/api/v1/Users/me', data),
onSuccess: () => {
// Sync AuthContext with updated name/email via token refresh
void refresh();
void refresh().catch(() => undefined); // a transient failure keeps the session as it is
},
});
}