ee47a445df
Refactor auth initialization to support three config states: 1. DB config (auth_provider_config table) — primary source 2. OIDC_* env vars — fallback when DB config absent 3. Unconfigured — graceful handling when neither source available Changes: - auth.ts: Add initAuth() async factory, getAuth() getter, getAuthPromise() - index.ts: Call initAuth() at startup before serve() - middleware/auth.ts: Use getAuth() instead of direct auth import - Add auth.test.ts covering all three config states Preserves AUTH_DISABLED=true behavior and original hairpin NAT pattern. Co-Authored-By: Paperclip <noreply@paperclip.ing>