Pular para o conteúdo
Skillpedia
APIs e servidores (backend)9,5 mil · #12234

convex-auth

O que ela faz

Esta skill adiciona login de usuários a um app construído na Convex. Configura o método de login, as configurações do servidor e uma tela básica de entrada.

Quando usar

  • ✓Quando você está construindo um app Convex e precisa que os usuários façam login.
  • ✓Quando quer adicionar passkeys, login com Google ou login por senha a um projeto Convex existente.
  • ✓Quando a configuração de login da Convex está falhando porque a configuração de autenticação está faltando ou errada.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-auth/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Adicione login com passkeys ao meu app Convex.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente instala a biblioteca de autenticação da Convex, adiciona o método de login escolhido, cria as chaves que o login precisa sem um assistente interativo e monta a página de entrada.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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.
Perguntas frequentes

Preciso saber programar para usar isso?

Ajuda ter alguma familiaridade técnica, já que o agente edita arquivos do projeto e define configurações do servidor. A skill guia cada etapa.

Quais métodos de login ela suporta?

Passkeys são o padrão. A skill também pode adicionar login por senha ou OAuth, como o Google, quando você pedir.

Ela vai rodar o assistente de configuração por mim?

Não. A skill evita o assistente interativo, que pode travar em execuções automáticas, e gera as chaves diretamente.

Detalhes

Descrição original do autor

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

repo: openclaw/clawhub

Popularidade

Estrelas no GitHub
9,5 mil
Posição no ranking
#12234
Licença
MIT
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas