Loading video...

Video Failed to Load

Go Home

Middleware in Next.js 13

52,722 views • 2 years ago •via X (Twitter)

9 Comments

Dan 's profile picture
Dan 2 years ago

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

@uartnet's profile picture
@uartnet2 years ago

Would be better if we could create nested middlwares !

Ben Baker's profile picture
Ben Baker2 years ago

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

Alex Sidorenko's profile picture
Alex Sidorenko2 years ago

Why not?

Salik Jamal's profile picture
Salik Jamal2 years ago

Very helpful post, I was just looking for this yesterday.

Krivoox 🇦🇷's profile picture
Krivoox 🇦🇷2 years ago

How do you edit that way? any program or template?

Pugazh.tsx's profile picture
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)'s profile picture
Kishore Andra (KcH)2 years ago

Me: what exactly is a middleware 😛

Alex Sidorenko's profile picture
Alex Sidorenko2 years ago

@tmoutinho_ Trigger a refetch for what? What are you trying to accomplish?

Related Videos