Next Js middleware & API cant call third party api
I have this following route which exists src/app/test/page.tsx
Conditionally add certain Middlewares in certain routes NEXT JS
Based on the documentation, all the middlewares are added in a single file called middleware.ts.
NextJS 14 ( App Router ) authentication middleware
I am struggling to create a simple jwt cookie authentication middleware where what I want is if there is no cookie to redirect to login and if there is to redirect to dashboard route