auth-protection
Installation
SKILL.md
Add Authentication Protection
Implement authentication and authorization patterns for this stack.
Goal
Secure resources with:
- User authentication (logged in)
- Ownership verification (user's own data)
- Role-based access control (admin, user, etc.)
Instructions
1. Convex Function Authentication
Add to any protected query/mutation:
import { getAuthUserId } from "@convex-dev/auth/server";