convex-setup-auth

Configures Convex authentication with provider wiring, identity mapping, and access control.

5|Updated Mar 5, 2024
One-click install
npx skills add https://github.com/TRAPZZY/God-Eyes --skill convex-setup-auth-trapzzy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-setup-auth
Source: https://github.com/TRAPZZY/God-Eyes/tree/main/.trae/skills/convex-setup-auth
Command: npx skills add https://github.com/TRAPZZY/God-Eyes --skill convex-setup-auth-trapzzy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Adding login and signup to a Convex app involves choosing an auth provider, wiring auth.config.ts, protecting backend functions, and mapping user identities, and getting any step wrong leaves the app unauthenticated or insecure. ## Core Features & Use Cases - Provider Selection and Setup: Guides setup for Convex Auth, Clerk, WorkOS AuthKit, Auth0, or custom JWT providers based on repo signals or user choice. - Backend Protection: Implements server-side identity checks with ctx.auth.getUserIdentity() instead of trusting client-provided user IDs. - User Management and Access Control: Creates users tables with identity mapping and role-based authorization only where the app actually needs them. - Use Case: A developer says "add auth to my Convex app" and the skill detects an existing Clerk dependency, reads the Clerk reference, configures auth.config.ts, wraps the app in ConvexProviderWithClerk, and verifies protected queries succeed after login. ## Quick Start Set up authentication for this Convex app by first determining the right provider, then wiring the user model, identity mapping, and access control.

Frequently Asked Questions about convex-setup-auth

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

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

Adding authentication to Convex starts with choosing a provider such as Convex Auth, Clerk, WorkOS AuthKit, or Auth0, then configuring convex/auth.config.ts and wrapping the client with the matching provider. Protect backend functions by calling ctx.auth.getUserIdentity() and rejecting unauthenticated requests.

Clerk vs Convex Auth for a Convex app?▼

Convex Auth handles auth directly inside Convex and manages user records internally, while Clerk provides hosted auth features and suits apps already using Clerk. Choose based on existing dependencies and whether you want auth managed in Convex or by a third party.

Does Convex support Auth0 and WorkOS AuthKit?▼

Convex supports Auth0 and WorkOS AuthKit through JWT validation configured in convex/auth.config.ts. Auth0 uses Auth0Provider with ConvexProviderWithAuth0, while AuthKit setup is driven by a convex.json authKit section and WorkOS environment variables.

Why does Convex report unauthenticated after login succeeds?▼

Convex reporting unauthenticated after a successful provider login usually means auth.config.ts is misconfigured or the backend config was not synced. Re-run the Convex dev or deploy flow, verify the issuer domain, and confirm the provider integration was activated.

When should I add a users table in Convex?▼

Add a users table in Convex only when the app needs first-class user records beyond authentication gates. Convex Auth manages user records internally, so a parallel users table with a storeUser flow is unnecessary for that provider.