Clerk middleware + trpc
Hello,
I don't understand why i can't use
authMiddleware
from Clerck with TRPC. In the docs he say use withClerkMiddleware
but you can't setup public / private route.2 Replies
i also dont understand.
i just want authmiddleware to ignore the "/" and the "/(api|trpc)(.)", like in config.
so i did this in middleware.ts:
```
import { authMiddleware } from "@clerk/nextjs";
export default authMiddleware({
publicRoutes: ["/", "/(api|trpc)(.)"],
});
export const config = {
matcher: ["/((?!.\..|_next).)", "/", "/(api|trpc)(.)"],
};
```
this feels wrong. but trpc works now.