convex-setup-auth

Configure Convex authentication and role-based access control across functions.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/WannaCry081/React-Workflow-Starter --skill convex-setup-auth-wannacry081
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-setup-auth
Source: https://github.com/WannaCry081/React-Workflow-Starter/tree/main/.agents/skills/convex-setup-auth
Command: npx skills add https://github.com/WannaCry081/React-Workflow-Starter --skill convex-setup-auth-wannacry081

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Sets up Convex authentication 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

  • Provider-agnostic auth wiring: supports Convex Auth or Clerk, WorkOS AuthKit, Auth0, or custom JWT providers.
  • Wire backend config: set up convex/auth.config.ts and provider bindings; protect backend functions with ctx.auth.getUserIdentity(); support role-based access.
  • Create or map users: create a users table and identity mapping if the app needs app-level user records.

Quick Start

Choose the auth provider, wire convex/auth.config.ts, and validate a login flow end-to-end.

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 Convex authentication with Clerk or Auth0?▼

To set up Convex authentication, select a provider like Clerk or Auth0, wire the bindings in convex/auth.config.ts, and validate the login flow. This maps user identities and protects backend functions.

How does ctx.auth.getUserIdentity() enforce role-based access in Convex?▼

ctx.auth.getUserIdentity() enforces role-based access by validating authenticated user identities inside protected Convex queries and mutations. It retrieves the user identity from the configured auth provider to gate backend function execution.

Can I use WorkOS AuthKit or custom JWT providers with Convex auth?▼

Yes, you can use WorkOS AuthKit or custom JWT providers with Convex auth. The provider-agnostic wiring supports mapping user identities and configuring auth.config.ts for external identity providers.

What's the best way to add login and signup to a Convex app?▼

The best way to add login and signup to a Convex app is selecting an auth provider, wiring auth.config.ts, and creating a users table with identity mapping. This establishes app-level user records for authentication.

Do I need a users table if I just want to require login for Convex functions?▼

You do not strictly need a users table just to require login, as validating ctx.auth.getUserIdentity() protects backend functions. However, creating a users table with identity mapping is required if the app needs app-level user records.

Why does my Convex auth configuration not protect my backend mutations?▼

Convex auth configuration fails to protect backend mutations if you have not explicitly validated ctx.auth.getUserIdentity() inside the protected functions. Wiring auth.config.ts alone only maps identities without enforcing access control.