MENU

Fun & Interesting

Next.js: Authentication (Best Practices for Server Components, Actions, Middleware)

Delba 176,222 lượt xem 7 months ago
Video Not Working? Fix It Now

Best practices for authentication in Modern Next.js and React: Server Components, Server Actions, Middleware.

Docs: https://rc.nextjs.org/docs/app/building-your-application/authentication
Code: https://github.com/vercel-labs/app-router-auth

00:00 Intro
00:25 Forms and Server Actions
00:51 Form validation
01:06 useActionState
01:45 Creating a user
02:14 Session management
04:13 Authorization
04:37 Middleware
05:33 Data Access Layer
07:35 API Minimization
08:03 Data Transfer Objects
09:45 Server Actions
10:19 Conditional Rendering
10:50 Client Context Providers
11:14 Summary

Comment