From cd0fdfbd6058f46210c615f334ef2db42f50f558 Mon Sep 17 00:00:00 2001 From: OpenClaw Bot Date: Sat, 21 Feb 2026 15:50:17 -0600 Subject: [PATCH] Add auth debug logging --- src/app/api/tasks/route.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/api/tasks/route.ts b/src/app/api/tasks/route.ts index 611a193..66f7617 100644 --- a/src/app/api/tasks/route.ts +++ b/src/app/api/tasks/route.ts @@ -65,8 +65,10 @@ export async function POST(request: Request) { try { const user = await getAuthenticatedUser(); if (!user) { - return NextResponse.json({ error: "Unauthorized" }, { status: 401 }); + console.error(">>> API POST: No authenticated user"); + return NextResponse.json({ error: "Unauthorized - please log in again" }, { status: 401 }); } + console.log(">>> API POST: Authenticated as", user.email); const body = await request.json(); const { task } = body as { task?: Task };