スキル一覧に戻る
Rehan-Ul-Haq

auth-builder

by Rehan-Ul-Haq

9🍴 2📅 2026年1月8日
GitHubで見るManusで実行

SKILL.md


name: auth-builder description: | Implements secure authentication for web applications. This skill should be used when users want to add login/signup, protect routes, or integrate auth providers into their applications.

Auth Builder

Implement secure authentication adapted to framework and requirements.

What This Skill Does

  • Implements authentication flows (signup, login, logout, refresh)
  • Configures session or token-based auth
  • Protects routes with middleware
  • Integrates OAuth providers (optional)

What This Skill Does NOT Do

  • Authorization (role-based access control) - separate concern
  • Identity management (user profiles, settings)
  • Multi-factor authentication setup
  • Security auditing

Before Implementation

SourceGather
CodebaseFramework, existing user model, database
ConversationAuth method, token storage, providers needed
Skill ReferencesSecurity patterns from references/

Required Clarifications

ClarificationOptionsSecurity Implications
Auth methodJWT / Session / OAuthToken storage, CSRF needs
Token storageCookie / localStorageXSS vs CSRF tradeoffs
Refresh strategyRefresh tokens / Sliding sessionToken lifetime
Password requirementsMin length, complexityBrute force resistance

Implementation Workflow

1. User Model → 2. Password Handling → 3. Auth Routes → 4. Middleware → 5. Token Management

1. User Model

Store only what's needed for auth:

  • Email (unique, indexed)
  • Password hash (NEVER plaintext)
  • Created/updated timestamps

2. Password Handling

See references/security-patterns.md.

Requirements:

  • Use bcrypt/argon2 (NOT MD5/SHA1)
  • Cost factor ≥ 10
  • Never log passwords

3. Auth Routes

RoutePurposeReturns
POST /signupCreate accountUser + tokens
POST /loginAuthenticateTokens
POST /logoutInvalidate sessionSuccess
POST /refreshGet new access tokenNew tokens

4. Middleware

Protect routes requiring authentication.

5. Token Management

JWT Strategy:

  • Short-lived access token (15 min)
  • Long-lived refresh token (7 days)
  • Store refresh token securely (httpOnly cookie)

Security Checklist

  • Passwords hashed with bcrypt/argon2
  • Tokens have expiration
  • Refresh tokens stored in httpOnly cookies
  • CSRF protection if using cookies
  • Rate limiting on auth endpoints
  • No sensitive data in JWT payload
  • Secure password reset flow

Reference Files

FileUse When
references/security-patterns.mdPassword hashing, token security
references/oauth-integration.mdAdding social login
references/common-vulnerabilities.mdAvoiding auth pitfalls

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です