Javascript – JWT verification with jose is failing
I have the following Next.js/Clerk.js middleware: import { authMiddleware } from "@clerk/nextjs"; import { jwtVerify } from "jose"; export default authMiddleware({ publicRoutes: ["/", "/contact", "/pricing", "/api/webhooks/user", "/api/reviews/add", "/api/user"], afterAuth (auth, req, evt) { const secret = new TextEncoder().encode (process.env.CLERK_PUBLIC_KEY) const…