🚨 STOP Using Auth in Next.js Layouts

preview_player
Показать описание


👇 Follow Me On Social Media:
Рекомендации по теме
Комментарии
Автор

It took me a month to finish your CSS3 video (practiced a lot) and it was great. Thank you very much. I will probably spend another 3 months learning SASS and Tailwind, and then I will learn JS from you again.
your videos are just great and you sir are a great teacher...

magnetarstar
Автор

Thanks for sharing, maybe this is why my app is fetching /api/auth/session 6 times in production

kasper
Автор

Many thanks for the advice❤ And yeah, I also realized that how important the middleware is because it allows us to apply custom logic on nextjs routing feature, and doing authentication is one of it's main use cases

seanfang
Автор

The face behind my success🥹 love from Nigeria Thanks Dave💕

divine-joyakinola
Автор

i was going to implement it on layout today in my project but your video saved it

jexroid
Автор

I stopped using Next.js nearly two months ago already. 🥰

ardapeker
Автор

Sucks that middleware racks up serverless function calls though

HemstitchedIrony
Автор

But sir we can't use Firebase auth in NextJs middleware because the middleware is using the edge runtime and Firebase admin sdk needs a nodejs runtime

mohammadahmermalick
Автор

How would you go on knowing wich ui shoy in different pages, lests say an sidebar needs to be different for admin and user

lucasrodriguez
Автор

I only did this to toggle Login buttons. Should I do that client side and also use Middleware for areas I need to be logged in for?

mattperry
Автор

lots of tutorials have us wrap the layout's output render in a context provider. Are you saying this too falls under the same problem?

wchorski
Автор

hi Dave Gray, do you have full video talking about this?

Tony-pqng
Автор

Correction: "I use Kinde in this app because they paid me to do so"

twisterrjl
Автор

middlewares are always the best ways ;)

ber
Автор

But for client side auth we have to wrap the component in layout.tsx

jaatjii
Автор

Every time a content creator starts their video with "staaap doing this ...", I press the "don't recommend this channel" button. Enough with the attention demands, try making valuable content instead.

robertsandiford