📖 Step 6: Development#166 / 291

Authentication / Authorization

Authentication / Authorization

📖One-line summary

Authentication (who you are) and authorization (what you can do).

💡Easy explanation

Authentication asks "Who are you?" (login); authorization asks "Can you do this?" (permission check). Example: log in (auth), then only admins can delete (authorization).

Example

Authentication (who?) → authorization (allowed?)

Step 1: Authentication

Step 2: Authorization

Please log in first

Vibe coding prompt examples

>_

Implement Google and Kakao social login with NextAuth.js. Use session-based authentication and gate page access by login state.

>_

Build a JWT-based auth system. Issue access and refresh tokens on login and implement token refresh logic.

>_

Build an authorization middleware that separates admin and regular user roles. Protect admin-only routes.

Try these prompts in your AI coding assistant!