From f9caa61c77344d09c914f19b59be19a9729202b5 Mon Sep 17 00:00:00 2001 From: shay Date: Sun, 19 Apr 2026 20:10:14 -0400 Subject: [PATCH] fix(frontend): send cookies on /generate POST Without credentials: 'include', the session cookie isn't attached and the OAuth-guarded endpoint returns 401. Co-Authored-By: Claude Opus 4.7 --- generator/frontend/src/App.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generator/frontend/src/App.tsx b/generator/frontend/src/App.tsx index c2b40d3..72f01ec 100644 --- a/generator/frontend/src/App.tsx +++ b/generator/frontend/src/App.tsx @@ -164,7 +164,10 @@ export default function App() { return } - const r = await fetch(`/api/${encodeURIComponent(username)}/generate`, { method: 'POST' }) + const r = await fetch(`/api/${encodeURIComponent(username)}/generate`, { + method: 'POST', + credentials: 'include', + }) if (r.status === 404) { const body = await r.json().catch(() => ({} as { status?: string })) setGenerateError(body.status === 'not_found' ? 'User not found' : 'Not enrolled')