본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)9.5k · #12258

convex-setup-auth

하는 일

이 스킬은 Convex 앱에 인증을 추가합니다. 로그인 제공자를 고르고, 사용자에 연결하며, 특정 기능을 로그인한 사람이나 특정 역할로 제한하도록 돕습니다.

사용하는 경우

  • ✓Convex 앱에 처음으로 로그인을 추가할 때.
  • ✓각 사람을 로그인 신원과 연결하는 사용자 테이블이 필요할 때.
  • ✓일부 함수나 페이지를 로그인한 사용자나 특정 역할로 제한하고 싶은 경우.

스킬 링크

https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-setup-auth/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-setup-auth/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 Convex 앱에 로그인을 설정하고, 로그인한 사용자만 자기 항목을 볼 수 있게 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

프로젝트가 이미 쓰는 제공자가 없다면, 에이전트는 먼저 어떤 로그인 제공자를 원하는지 묻습니다. 그다음 제공자, 사용자 테이블, 로그인한 사람을 확인하는 도우미 함수를 설정합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Convex Authentication Setup

Implement secure authentication in Convex with user management and access control.

When to Use

  • Setting up authentication for the first time
  • Implementing user management (users table, identity mapping)
  • Creating authentication helper functions
  • Setting up auth providers (Convex Auth, Clerk, WorkOS AuthKit, Auth0, custom JWT)

When Not to Use

  • Auth for a non-Convex backend
  • Pure OAuth/OIDC documentation without a Convex implementation
  • Debugging unrelated bugs that happen to surface near auth code
  • The auth provider is already fully configured and the user only needs a one-line fix

First Step: Choose the Auth Provider

Convex supports multiple authentication approaches. Do not assume a provider.

Before writing setup code:

  1. Ask the user which auth solution they want, unless the repository already makes it obvious
  2. If the repo already uses a provider, continue with that provider unless the user wants to switch
  3. If the user has not chosen a provider and the repo does not make it obvious, ask before proceeding

Common options:

  • Convex Auth - good default when the user wants auth handled directly in Convex
  • Clerk - use when the app already uses Clerk or the user wants Clerk's hosted auth features
  • WorkOS AuthKit - use when the app already uses WorkOS or the user wants AuthKit specifically
  • Auth0 - use when the app already uses Auth0
  • Custom JWT provider - use when integrating an existing auth system not covered above

Look for signals in the repo before asking:

  • Dependencies such as @clerk/*, @workos-inc/*, @auth0/*, or Convex Auth packages
  • Existing files such as convex/auth.config.ts, auth middleware, provider wrappers, or login components
  • Environment variables that clearly point at a provider

After Choosing a Provider

Read the provider's official guide and the matching local reference file:

The local reference files contain the concrete workflow, expected files and env vars, gotchas, and validation checks.

Use those sources for:

  • package installation
  • client provider wiring
  • environment variables
  • convex/auth.config.ts setup
  • login and logout UI patterns
  • framework-specific setup for React, Vite, or Next.js

For shared auth behavior, use the official Convex docs as the source of truth:

Prefer official docs over recalled steps, because provider CLIs and Convex Auth internals change between versions. Inventing setup from memory risks outdated patterns. For third-party providers, only add app-level user storage if the app actually needs user documents in Convex. Not every app needs a users table. For Convex Auth, follow the Convex Auth docs and built-in auth tables rather than adding a parallel users table plus storeUser flow, because Convex Auth already manages user records internally. After running provider initialization commands, verify generated files and complete the post-init wiring steps the provider reference calls out. Initialization commands rarely finish the entire integration.

Core Pattern: Protecting Backend Functions

The most common auth task is checking identity in Convex functions.

// Bad: trusting a client-provided userId
export const getMyProfile = query({
  args: { userId: v.id("users") },
  handler: async (ctx, args) => {
    return await ctx.db.get(args.userId);
  },
});
// Good: verifying identity server-side
export const getMyProfile = query({
  args: {},
  handler: async (ctx) => 
자주 묻는 질문

어떤 로그인 제공자를 설정할 수 있나요?

선택에 따라 Convex Auth, Clerk, WorkOS AuthKit, Auth0 또는 사용자 정의 JWT 설정을 할 수 있습니다.

제공자를 대신 골라 주나요?

프로젝트가 이미 쓰는 제공자가 있을 때만 그렇습니다. 그렇지 않으면 에이전트가 먼저 묻습니다.

다른 백엔드에도 쓸 수 있나요?

아닙니다. Convex 앱 전용입니다.

상세 정보

작성자의 원본 설명

Sets up Convex auth, identity mapping, and access control. Use for login, auth providers, users tables, protected functions, or roles in a Convex app.

repo: openclaw/clawhub

인기도

GitHub 스타
9.5k
순위
#12258
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬