convex-auth

Adds passkey or OAuth authentication to Convex apps including auth.config.ts wiring.

Updated Sep 17, 2026
One-click install
npx skills add https://github.com/Tehzeeb07/CodeRush --skill convex-auth-tehzeeb07
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-auth
Source: https://github.com/Tehzeeb07/CodeRush/tree/main/.agents/skills/convex-auth
Command: npx skills add https://github.com/Tehzeeb07/CodeRush --skill convex-auth-tehzeeb07

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @convex-dev/auth, jose.

What problem does it solve? Setting up authentication in a Convex app involves several error-prone steps: generating JWT keys, configuring auth.config.ts, and wiring client providers. A missing or incorrect auth.config.ts causes a silent always-signed-out bug, and the interactive setup wizard hangs in headless or CI environments. ## Core Features & Use Cases - Headless Key Generation: Generates JWT_PRIVATE_KEY and JWKS deterministically with the jose library instead of the interactive @convex-dev/auth wizard that hangs in non-interactive runs. - Provider Setup: Installs and configures @convex-dev/auth with Passkeys by default, or Password/OAuth providers like Google on request. - Client Wiring: Sets up ConvexAuthProvider, sign-in components, and route guards, including installing required shadcn/ui primitives. - Use Case: You are building a Next.js app backed by Convex and need user sign-in. This Skill installs the auth library, generates keys, sets environment variables on the deployment, writes auth.config.ts, and verifies a real sign-in round-trips. ## Quick Start Add passkey sign-in to my Convex app and wire up the auth config and sign-in UI.

Frequently Asked Questions about convex-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add authentication to a Convex app?▼

Install @convex-dev/auth, add a provider like Passkeys in convex/auth.ts, generate JWT keys, write auth.config.ts, and wire ConvexAuthProvider on the client. Verify a real sign-in round-trips before finishing.

How to generate Convex auth keys without the interactive wizard?▼

Generate JWT_PRIVATE_KEY and JWKS headlessly using the jose library with an extractable RS256 key pair. The interactive npx @convex-dev/auth wizard requires a TTY login and hangs in non-interactive or CI environments.

Why is my Convex app always signed out with no error?▼

A missing or incorrect auth.config.ts causes the silent always-signed-out bug. Always write auth.config.ts with the correct provider configuration so the server can validate sessions.

Does Convex auth support passkeys and OAuth providers?▼

Yes, @convex-dev/auth supports Passkeys as the default provider, plus Password and OAuth providers like Google on request. The provider is configured in convex/auth.ts.

Why does npx convex env set fail for JWT_PRIVATE_KEY?▼

The key value starts with -----BEGIN, and the CLI parses the leading dash as an unknown flag when passed as a separate argument. Use the NAME=VALUE form or the Convex MCP envSet tool instead.