diff --git a/frontend/src/proxy.ts b/frontend/src/proxy.ts index 4660008..96700b2 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(); - const session = await auth(); - session.protect(); + // Clerk middleware auth object supports protect() directly. + auth().protect(); return NextResponse.next(); }) : () => NextResponse.next();