convex-setup-auth

Set up Convex authentication with provider selection and access control.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/birajdotdev/next-clerk-convex-starter --skill convex-setup-auth-birajdotdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-setup-auth
Source: https://github.com/birajdotdev/next-clerk-convex-starter/tree/main/.agents/skills/convex-setup-auth
Command: npx skills add https://github.com/birajdotdev/next-clerk-convex-starter --skill convex-setup-auth-birajdotdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Sets up authentication for a Convex app with user management, identity mapping, and access control. Use this skill when adding login or signup to a Convex app, configuring Convex Auth, Clerk, WorkOS AuthKit, Auth0, or custom JWT providers, wiring auth.config.ts, protecting queries and mutations with ctx.auth.getUserIdentity(), creating a users table with identity mapping, or setting up role-based access control, even if the user just says "add auth" or "make it require login."

Core Features & Use Cases

  • Determine the provider to use (Convex Auth, Clerk, WorkOS AuthKit, Auth0, or custom JWT)
  • Wire backend and frontend so Convex can authenticate requests and gate protected UI
  • Create or map a users identity model and implement access control rules as needed
  • Use Case: Add login/signup to an existing Convex app and enforce role-based access with ctx.auth.getUserIdentity()

Quick Start

Choose an auth provider and wire Convex authentication by updating convex/auth.config.ts, creating or mapping a users table, and enabling ctx.auth.getUserIdentity() guards in backend queries and mutations.

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?

Configuring Convex authentication involves wiring frontend and backend environments through auth.config.ts, mapping a users identity table, and applying ctx.auth.getUserIdentity() checks to protect queries and mutations.

Which auth providers can I use with Convex?

You can use Convex Auth, Clerk, WorkOS AuthKit, Auth0, or custom JWT providers for Convex authentication, each requiring specific package installations and environment variable configurations.

How do I protect Convex queries and mutations with role-based access control?

Implement role-based access control in Convex by using ctx.auth.getUserIdentity() checks within queries and mutations to gate protected data based on authenticated user identities and roles.

What's the best way to wire Clerk or Auth0 with Convex for user login?

Wiring Clerk or Auth0 with Convex requires updating convex/auth.config.ts with provider-specific settings, setting environment variables, and mapping user identities to enforce authenticated access.

Do I need a custom users table for identity mapping in Convex?

Creating a users table for identity mapping in Convex links provider identities to your app data, enabling accurate access control and user management across Convex Auth, Clerk, or Auth0.