~bigbes/lethe: f2376137

web: /login + /auth/callback routes + auth context + config reader

- web/src/lib/config.ts: readConfig() reads window.__LETHE_CONFIG__ (IF1),
  converts client_id -> clientId, throws on absent config (GPC6)
- web/src/lib/authContext.tsx: AuthProvider subscribes to tokenStore, parses
  ID token name claim, exposes signIn/signOut/reportAuthError via context;
  hasBeenAuthenticated flag supports IV7 cold-vs-session distinction
- web/src/routes/login.tsx: /login route calls signIn(return_to) on mount
- web/src/routes/auth.callback.tsx: validates state+TTL, exchanges code via
  raw fetch to OP /token (allowed exception), stores access_token via
  tokenStore.set, anti-loop guard using countCallbackFailures (IV6)
- web/src/routes/__root.tsx: wraps tree in AuthProvider above
  KeyboardCursorContext
- web/src/routeTree.gen.ts: regenerated by Vite with /login and /auth/callback
- internal/server/web/dist/index.html: rebuilt artifact with new asset hashes

Eugene Blikh <bigbes@gmail.com> — 2026-04-26 14:57:18 UTC

Commit f2376137d0f2f8cd5978839c3be663ad85527576view raw patch

Parent(s): 5d910e82

7 changed file(s)

FileStatus+
internal/server/web/dist/index.html M +1 -1
web/src/lib/authContext.tsx A +226
web/src/lib/config.ts A +39
web/src/routeTree.gen.ts M +42
web/src/routes/__root.tsx M +10 -7
web/src/routes/auth.callback.tsx A +246
web/src/routes/login.tsx A +32