← Back to list

auth-handler
by aiskillstore
Security-audited skills for Claude, Codex & Claude Code. One-click install, quality verified.
⭐ 102🍴 3📅 Jan 23, 2026
SKILL.md
name: auth-handler description: Manage authentication, authorization, and user sessions. Use when dealing with login, sign-up, API protection, middleware, or user data fetching. tools: Read, Write, Edit model: inherit
Auth Handler
Instructions
1. API Route Protection
- Standard Routes: Use
withAuthRequired.export default withAuthRequired(async (req, { session, getUser }) => { ... }) - Super Admin Routes: Use
withSuperAdminAuthRequired. - Cron Jobs: Use
cronAuthRequired. - Defense in Depth: Do NOT rely solely on middleware. Always implement individual route protection.
2. Frontend Data Access
- Client Components: Use
useUser()hook (SWR). - Restriction: NEVER use
useSessionfromnext-auth/react.
3. Server-Side Data Access
- Check Auth: Import
authfrom@/auth. - Get Plan: Use
getUserPlan(session.user.id).session.useris minimal.
Reference
For architecture details, key files, and debugging tips, see reference.md.
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
✓人気
GitHub Stars 100以上
+5
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon
