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

convex-auth

하는 일

이 스킬은 Convex로 만든 앱에 사용자 로그인을 추가합니다. 로그인 방식, 서버 설정, 기본 로그인 화면을 설정합니다.

사용하는 경우

  • ✓Convex 앱을 만들면서 사용자가 로그인해야 할 때.
  • ✓기존 Convex 프로젝트에 패스키, 구글 로그인, 비밀번호 로그인을 추가하고 싶을 때.
  • ✓인증 구성이 없거나 잘못되어 Convex 로그인 설정이 실패하는 경우.

스킬 링크

https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-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-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분.

작동 방식

에이전트는 Convex 인증 라이브러리를 설치하고, 선택한 로그인 방식을 추가하며, 대화형 마법사 없이 로그인에 필요한 키를 만든 뒤, 로그인 화면을 연결합니다.

기술 내용 (원본 SKILL.md)

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

<!-- GENERATED from convex-agents content/capabilities/auth.json — do not edit by hand. -->

Add sign-in to the app

Install and wire @convex-dev/auth for the current app: a provider (passkeys by default, or OAuth/password), the server config, the client hooks, and a sign-in UI — correctly, including the auth.config.ts that's the #1 real-world auth footgun.

Workflow

  1. Install @convex-dev/auth (pinned build) and add it to convex.config.ts. With pnpm, also pnpm add jose (it won't hoist otherwise); you need it for step 3.
  2. Add the provider in convex/auth.ts (Passkey by default; Password or OAuth like Google on request).
  3. Generate the auth keys HEADLESSLY. Do NOT run the interactive npx @convex-dev/auth wizard: it needs a login/TTY and hangs in non-interactive, anonymous, or CI runs (the #1 auth time-sink). Generate JWT_PRIVATE_KEY + JWKS deterministically with jose: node -e 'import("jose").then(async({generateKeyPair,exportPKCS8,exportJWK})=>{const k=await generateKeyPair("RS256",{extractable:true});const priv=await exportPKCS8(k.privateKey);const pub=await exportJWK(k.publicKey);process.stdout.write(JSON.stringify({JWT_PRIVATE_KEY:priv.trimEnd().replace(/\n/g," "),JWKS:JSON.stringify({keys:[{use:"sig",...pub}]})}))})' > .auth-keys.json Then set JWT_PRIVATE_KEY and JWKS (from .auth-keys.json) plus SITE_URL on the deployment. Prefer the Convex MCP envSet tool, one call per var, to avoid shell-quoting the multi-line key. CLI fallback: use the NAME=VALUE form (npx convex env set "JWT_PRIVATE_KEY=$JWT"), NEVER env set JWT_PRIVATE_KEY "$JWT" (the value starts with -----BEGIN and the CLI parses the leading - as an unknown flag). SITE_URL is the dev URL (e.g. http://localhost:3000). Delete .auth-keys.json after.
  4. Write convex/auth.config.ts (the silently-always-signed-out bug lives here if it's wrong).
  5. Wire the client: ConvexAuthProvider, the sign-in component, and route guards. If you import shadcn/ui primitives (button, input, textarea, label, and so on), add them first with npx shadcn@latest add <name>; a missing @/components/ui/* is a hard build error.
  6. Verify a sign-in round-trips before declaring done.

Rules

  • Generate JWT_PRIVATE_KEY/JWKS with jose (extractable RS256; PKCS8 newlines to spaces; JWKS = {keys:[{use:"sig", ...publicJwk}]}). Do NOT run the interactive npx @convex-dev/auth wizard: it hangs headless/anonymous. Set the vars via the MCP envSet tool or the NAME=VALUE CLI form.
  • Always write auth.config.ts: a missing/incorrect one makes the app silently always-signed-out with no error.
  • Passkeys by default; only switch to password/OAuth on explicit request.
  • Install any shadcn/ui primitive you import up front (npx shadcn@latest add ...); a missing @/components/ui/* is a hard build failure.
  • Verify a real sign-in works before finishing.
자주 묻는 질문

이것을 쓰려면 코딩을 알아야 하나요?

기술적인 익숙함이 도움이 됩니다. 에이전트가 프로젝트 파일을 편집하고 서버 설정을 하므로, 스킬이 각 단계를 안내합니다.

어떤 로그인 방식을 지원하나요?

패스키가 기본입니다. 요청하면 비밀번호나 구글 같은 OAuth 로그인도 추가할 수 있습니다.

설정 마법사를 대신 실행하나요?

아닙니다. 자동 실행에서 멈출 수 있는 대화형 마법사를 피하고, 키를 직접 만듭니다.

상세 정보

작성자의 원본 설명

Add authentication (passkeys/OAuth) to the current Convex app, including the auth.config.ts wiring.

repo: openclaw/clawhub

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬