Communitygithub.com

YepAPI/skills

세션 인증, 소셜 프로바이더, CSRF 보호 및 안전한 쿠키 패턴을 제공합니다.

skills란 무엇인가요?

이 스킬은 웹 애플리케이션을 위한 세션 기반 인증 구현을 안내하며, API 간 인증에만 JWT를 사용하도록 권장합니다. Google 및 GitHub 소셜 로그인, 매직 링크, 역할 기반 접근 제어를 지원하며, CSRF 보호와 안전한 쿠키 설정을 통해 보안을 강화합니다. 또한 리프레시 토큰 로테이션을 통해 토큰의 수명을 제한하여 보안 위험을 최소화합니다. 주로 Node.js 기반 웹 프레임워크(예: Express, Next.js)와 함께 사용되며, 클라이언트 측 저장소 대신 httpOnly 쿠키 사용을 강조합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/auth

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

인증

규칙

  • 웹 앱은 세션 기반 인증 — JWT는 API 간 통신에만 사용
  • 경로 보호를 위한 미들웨어 — 렌더링 전 세션 확인
  • 소셜 프로바이더: Google + GitHub 최소 — 대상에 따라 추가
  • 매직 링크를 비밀번호 대안으로 — 더 간단하고 안전함
  • 역할 기반 접근: user.role 필드와 미들웨어 검사 사용
  • 모든 변경 엔드포인트에 CSRF 보호 적용
  • 안전한 쿠키 설정: httpOnly, secure, sameSite: "lax", 적절한 maxAge
  • 리프레시 토큰 로테이션 — 토큰이 영원히 살지 않도록 함

피해야 할 사항

  • localStorage에 토큰 저장 — httpOnly 쿠키 사용
  • 자체 비밀번호 해싱 구현 — 인증 라이브러리를 통해 bcrypt/argon2 사용
  • 서버 검증 없이 클라이언트 측 역할 확인
  • 양식 제출 시 CSRF 보호 누락

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

YepAPI/skills

WCAG 2.1 AA — semantic HTML, keyboard navigation, screen readers.

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Content planning with trend and sentiment data from YepAPI.

YepAPI/skills

Content calendar, keyword-driven planning, and content briefs.

YepAPI/skills

Theme switching with CSS variables, system preference detection, next-themes, and persistence.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Layout grids, KPI cards, data tables with sorting/filtering, sidebar navigation, and responsive breakpoints.

YepAPI/skills

Data encryption — TLS everywhere, AES-256-GCM for PII, bcrypt passwords, encrypted backups.

YepAPI/skills

Chart patterns with Recharts/Nivo/D3, responsive containers, color scales, and accessibility.

YepAPI/skills

Drizzle schema definition, push vs migrate, type-safe queries, relations, transactions, and prepared statements.

YepAPI/skills

Upload handling, resize/compress, CDN delivery, blur placeholders, and next/image patterns.

YepAPI/skills

Local business and Google Maps research using YepAPI.

YepAPI/skills

Cursor-based pagination, IntersectionObserver, virtualized lists with @tanstack/react-virtual, and scroll position restoration.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

관련 스킬