Skip to content
Y
yTube.SITE v8.0.4
media / worlds / tools / internet oddities
YouTube / video information

🚨 STOP Using Auth in Next.js Layouts

Video information, playback and saved actions.

🚨 STOP Using Auth in Next.js Layouts

Description: 🚨 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 ➜ https://patreon.com/davegray

👉 Checkout the Kinde Next.js docs: https://docs.kinde.com/developer-tools/sdks/backend/nextjs-sdk/

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

🚀 Discord ➜ https://discord.gg/neKghyefqh

👇 Follow Me On Social Media:
GitHub: https://github.com/gitdagray
X: https://twitter.com/yesdavidgray
LinkedIn: https://www.linkedin.com/in/davidagray/
Blog: https://www.davegray.codes/ Close description
      
Videos related to "🚨 STOP Using Auth in Next.js Layouts"