Next Auth middleware redirects me to the login page, even if there's a session
I am busting my head around this thing. I tried to setup NextJS with NextAuth, Drizzle and PlanetScale. So I am not using the T3-scaffold. The thing is that I can see that there's a user returned from
getServerSession
getServerSession
. But when I add my middleware.ts file. It just keeps redirecting me to the login page. As if there would be no session the middleware could recognize.