MENU

Fun & Interesting

Here's how you do auth with 100% SSR in Next.js

Appwrite 9,732 8 months ago
Video Not Working? Fix It Now

Integrate Appwrite with NEXT.js with app router, server rendered components, and server actions. Build protected pages & API routes with user sessions. Instructor: https://twitter.com/dennisivy11 / https://www.linkedin.com/in/dennis-ivanov/ 💬 Follow Appwrite on social media & join our Discord community. Source code: https://github.com/divanov11/Nextjs-Appwrite-Auth-SSR • Twitter: https://twitter.com/appwrite • Discord: https://appwrite.io/discord • LinkedIn: https://www.linkedin.com/company/appwrite Time stamps: 00:00 Intro 3:00 App setup 9:07 Connecting Appwrite 12:40 Creating admin client 15:50 API route (W/Admin Client) 18:00 Querying data with SSR components 21:23 Protected pages 25:02 Creating session client 26:15 Session client requests 28:45 Creating & setting sessions 35:56 Getting user 39:30 Manually sending cookies 45:34 Custom Fetch wrapper 49:28 Customer layouts (route groups) 53:40 Logout

Comment