convex-setup-auth

Configures Convex authentication, identity mapping, and access control across multiple auth providers.

Updated Jul 26, 2026
One-click install
npx skills add https://github.com/chrissstellee/Movix --skill convex-setup-auth-chrissstellee
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-setup-auth
Source: https://github.com/chrissstellee/Movix/tree/main/.agents/skills/convex-setup-auth
Command: npx skills add https://github.com/chrissstellee/Movix --skill convex-setup-auth-chrissstellee

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up authentication in a Convex app involves choosing a provider, wiring backend config, client providers, environment variables, and protected functions, and getting any step wrong leaves the app silently unauthenticated. This Skill guides the full setup so Convex actually validates user sessions end to end. ## Core Features & Use Cases - Provider Selection Guidance: Detects or asks which auth provider to use among Convex Auth, Clerk, WorkOS AuthKit, Auth0, or a custom JWT provider, based on repo signals like dependencies and existing config files. - Provider-Specific References: Ships detailed reference files for each provider covering installation, convex/auth.config.ts setup, environment variables, gotchas, and validation steps. - Secure Backend Patterns: Enforces server-side identity checks with ctx.auth.getUserIdentity() instead of trusting client-provided user IDs, and adds authorization checks only where needed. - Use Case: You are building a Next.js app on Convex and need login with Clerk. The Skill walks through activating the Clerk Convex integration, configuring convex/auth.config.ts, wrapping the app in ClerkProvider and ConvexProviderWithClerk, and verifying protected queries return data after sign-in. ## Quick Start Set up authentication for my Convex app, figure out the right provider from my repo, and wire up login, protected functions, and user identity mapping.

Frequently Asked Questions about convex-setup-auth

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

FAQPage Schema
How do I set up authentication in a Convex app?▼

First choose a provider such as Convex Auth, Clerk, WorkOS AuthKit, or Auth0, then configure convex/auth.config.ts, set environment variables, and wrap the client with the matching provider. Verify that ctx.auth.getUserIdentity() returns an identity in protected functions after login.

Which auth provider should I use with Convex?▼

Convex Auth is the default when you want auth handled directly in Convex. Use Clerk, WorkOS AuthKit, or Auth0 when the app already uses those platforms or needs their hosted features. Check the repo for existing provider dependencies before deciding.

How do I protect Convex queries and mutations with auth?▼

Call ctx.auth.getUserIdentity() inside the function and throw an error if it returns null, then look up the user by identity.tokenIdentifier. Never trust a client-provided userId argument, since clients can forge it.

Does Convex Auth require a users table?▼

No. Convex Auth manages user records internally through its built-in auth tables, so adding a parallel users table plus storeUser flow is unnecessary unless the app needs custom app-level user documents. For many apps, ctx.auth.getUserIdentity() alone is enough.

Why does Convex report unauthenticated after Clerk login?▼

This usually means the Clerk Convex integration was not activated at the Clerk dashboard setup page, or convex/auth.config.ts was not synced after changes. Activate the integration, sign out fully, sign back in, and rerun the Convex dev flow.

When should I not use this Convex auth setup approach?▼

Do not use it for non-Convex backends, pure OAuth documentation without a Convex implementation, or when the provider is already fully configured and only a one-line fix is needed. It targets full auth setup workflows, not unrelated debugging.