From 9184ebed25f0b72fd31ac69755c402dc947a098c Mon Sep 17 00:00:00 2001 From: "Arjun (OpenClaw)" Date: Sat, 7 Feb 2026 19:36:52 +0000 Subject: [PATCH] fix(frontend): satisfy Clerk auth() types in middleware Avoid calling protect() on a Promise by awaiting auth() first. --- frontend/src/proxy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/proxy.ts b/frontend/src/proxy.ts index 5fb6d13e..46600084 100644 --- a/frontend/src/proxy.ts +++ b/frontend/src/proxy.ts @@ -14,7 +14,8 @@ const isPublicRoute = createRouteMatcher(["/sign-in(.*)"]); export default isClerkEnabled() ? clerkMiddleware(async (auth, req) => { if (isPublicRoute(req)) return NextResponse.next(); - await auth().protect(); + const session = await auth(); + session.protect(); return NextResponse.next(); }) : () => NextResponse.next();