dynamic routes in middleware with next-auth

so i want to do dynamic routes using next-auth with the config varibe that middleware offers

This is what i have defined
export { default } from "next-auth/middleware"

export const config = { matcher: ["/[id]/:path*", "/recipes/[id]/:path*"] }

i have tried doing something like this
export { default } from "next-auth/middleware"

export const config = { matcher: ["/(.*)/:path*", "/recipes/(.*)/:path*"] }


i also tried defining it myself using a function but that didn't really work
Solution
Ok ,then you can just expand on my example like so
Was this page helpful?