Next.js 15 Authentication COMPLETE Guide (+ Best Practices, Pitfalls)
ByteGrad
@bytegradAbout
Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). My COMPLETE React & Next.js course is out now! Find it here: https://bytegrad.com/courses/professional-react-nextjs It's the #1 resource to master the latest React & Next.js. I'm very proud of it, my best work! Interested in sponsoring me? I love working with sponsors. Please email me here: [email protected] Note that my videos may contain mistakes. Always verify yourself that your code is safe and does what you want it to do for your specific situation. You agree by watching the videos that you are solely responsible for any mistakes in your code. This channel and all its content is owned & operated by ByteGrad Sp. z o.o. with Tax ID: PL6762676561 and KRS-number: 0001125554
Latest Posts
Video Description
👉 Get $50 Kinde credit (sponsored): https://kinde.com/r/?kinde_ref=e95bc6f8f17eda7c&utm_source=yt&utm_medium=social&utm_campaign=bytegradytjan25&utm_term=bytegrad&utm_content=nextjsauthentication (paid sponsorship) 👉 NEW React & Next.js Course: https://bytegrad.com/courses/professional-react-nextjs Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). 👉 Kinde $50 credit for auth and more https://kinde.com/r?kinde_ref=e95bc6f8f17eda7c 👉 Work with me: [email protected] 👉 NEW React & Next.js Course: https://bytegrad.com/courses/professional-react-nextjs 👉 Professional JavaScript Course: https://bytegrad.com/courses/professional-javascript 👉 Professional CSS Course: https://bytegrad.com/courses/professional-css 👉 Web development roadmap 2024 & 2025: https://email.bytegrad.com 👉 Email newsletter (BIG update soon): https://email.bytegrad.com 👉 Discord: all my courses have a private Discord ⏱️ Timestamps: 00:00 What should be protected in Next.js? 03:48 Cookies and tokens (JWT) 04:27 Auth solution: External (Kinde) vs Do It Yourself? 06:18 Kinde setup 07:56 Protect routes (server components) 10:09 Logout link 11:17 Login link & Register link 11:52 Layout vs Page (where to do auth check?) 14:05 Middleware vs Page (where to do auth check?) 17:49 Protect server actions 20:25 Pitfall: using server action on unprotected route 21:50 Protect route handlers 22:08 Show user info in header: client-side auth (avatar + email in header) 23:28 Pitfall: static & dynamic rendering (IMPORTANT!) 27:44 Connecting external auth solution with your own database 29:45 Pitfall: forgetting authorization 32:14 Roles & Permissions (admin role) 35:09 Best practice: Data Access Layer (DAL) #webdevelopment #reactjs #nextjs Note that my videos may contain mistakes. Always verify yourself that your code is safe and does what you want it to do for your specific situation. You agree by watching the videos that you are solely responsible for any mistakes in your code. This channel and all its content is owned & operated by ByteGrad Sp. z o.o. with Tax ID: PL6762676561 and KRS-number: 0001125554 . . TOP resource to LEARN AI for Developers - https://datacamp.pxf.io/RGyxrR (paid sponsorship & ByteGrad Sp. z o.o. gets commission)
No Recommendations Found
No products were found for the selected channel.



















