Next.js Discord

Discord Forum

middleware.ts problems

Unanswered
Mugger Crocodile posted this in #help-forum
Open in Discord
Mugger CrocodileOP
Hey, I have this little problem, in my [middleware](https://github.com/xSenny/nextjs-auth-boilerplate/blob/master/middleware.ts) I get redirected to /sign-in, which should happen only when the session is null, and if I console log it, it is null, but idk why if I use the same logics in the sign-in/page.tsx file, it prints the actual session with all of its data. Why does it happen? The cookie is the same in the both parts

0 Replies