Loading video...
Video Failed to Load
Middleware in Next.js 13
52,722 views • 2 years ago •via X (Twitter)
9 Comments

Dan 2 years ago
i mainly use the middleware to kick the user back to login if they are not logged in

@uartnet2 years ago
Would be better if we could create nested middlwares !

Ben Baker2 years ago
@asidorenko_ have you had any success accessing cookies/sessions. Seems like it's not yet possible...

Alex Sidorenko2 years ago
Why not?

Salik Jamal2 years ago
Very helpful post, I was just looking for this yesterday.

Krivoox 🇦🇷2 years ago
How do you edit that way? any program or template?

Pugazh.tsx2 years ago
May be if don't need to overwrite here is the default one export { default } from "next-auth/middleware"; And add matchers that'll do🏌🏻

Kishore Andra (KcH)2 years ago
Me: what exactly is a middleware 😛

Alex Sidorenko2 years ago
@tmoutinho_ Trigger a refetch for what? What are you trying to accomplish?
