Sessie: een start-refresh zonder oordeel (429/5xx/netwerk) zet de gebruiker niet meer op gast maar toont een retry-scherm; Retry-After wordt gestuurd en gerespecteerd

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 21:04:49 +01:00
co-authored by Claude Sonnet 5.5
parent b8f6b25121
commit 64a467b41b
12 changed files with 297 additions and 12 deletions
@@ -1,7 +1,12 @@
import { createContext, useContext } from 'react';
import type { User } from '@/features/auth/services/types';
export type AuthStatus = 'loading' | 'authenticated' | 'guest';
/**
* 'unreachable': the start-up refresh could not get a verdict (rate limit, restart, network) after the quiet retries.
* The session is neither confirmed nor ended - the refresh cookie is untouched - so the app offers a retry
* instead of treating the visitor as signed out.
*/
export type AuthStatus = 'loading' | 'authenticated' | 'guest' | 'unreachable';
export interface AuthContextValue {
status: AuthStatus;