🚨 STOP Using Auth in Next.js Layouts

Published: 04 June 2024
on channel: Dave Gray
32,173
1.5k

🚨 STOP Using Auth in Next.js Layouts. By checking auth, you are retrieving cookies. If you do this in a Next.js layout, you make every route the layout applies to dynamic. In this short, I show a better way.

The regex string from my Next.js middleware:
"/((?!api|_next/static|_next/image|favicon.ico|robots.txt|$).*)"

💖 Support me on Patreon ➜   / davegray  

👉 Checkout the Kinde Next.js docs: https://docs.kinde.com/developer-tool...

💻 Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap

🚀 Discord ➜   / discord  

👇 Follow Me On Social Media:
GitHub: https://github.com/gitdagray
X:   / yesdavidgray  
LinkedIn:   / davidagray  
Blog: https://www.davegray.codes/


On this page of the site you can watch the video online 🚨 STOP Using Auth in Next.js Layouts with a duration of hours minute second in good quality, which was uploaded by the user Dave Gray 04 June 2024, share the link with friends and acquaintances, this video has already been watched 32,173 times on youtube and it was liked by 1.5 thousand viewers. Enjoy your viewing!