Closed zogss closed 1 year ago
Fixed!
I found that i also have to add the api path in the publicRoutes
array.
import { authMiddleware } from "@clerk/nextjs";
export default authMiddleware({
publicRoutes: ["/", "/:slug", "/post/:id", "/api/trpc/(posts)(.*)"],
});
export const config = {
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"],
};
I tried forward with Clerk but when I added log out flow no query in trpc worked. I tried to add a public route in clerk middleware, but not worked too.