From ed2556c871c5b10e2a5f2c0e10c7785907494e90 Mon Sep 17 00:00:00 2001 From: "Arjun (OpenClaw)" Date: Sat, 7 Feb 2026 19:55:29 +0000 Subject: [PATCH] fix(frontend): await auth() before protect Fix TS2339 by awaiting Clerk auth() (returns Promise) before calling protect(). --- frontend/src/proxy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/proxy.ts b/frontend/src/proxy.ts index 96700b29..46600084 100644 --- a/frontend/src/proxy.ts +++ b/frontend/src/proxy.ts @@ -14,8 +14,8 @@ const isPublicRoute = createRouteMatcher(["/sign-in(.*)"]); export default isClerkEnabled() ? clerkMiddleware(async (auth, req) => { if (isPublicRoute(req)) return NextResponse.next(); - // Clerk middleware auth object supports protect() directly. - auth().protect(); + const session = await auth(); + session.protect(); return NextResponse.next(); }) : () => NextResponse.next();