convex-setup-auth

Configure Convex authentication and authorization with provider-specific wiring.

5|Updated Apr 29, 2020
One-click install
npx skills add https://github.com/vanities/bitchan --skill convex-setup-auth-vanities
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-setup-auth
Source: https://github.com/vanities/bitchan/tree/main/web/.agents/skills/convex-setup-auth
Command: npx skills add https://github.com/vanities/bitchan --skill convex-setup-auth-vanities

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This skill helps you configure authentication in a Convex app so backend functions can reliably identify users and enforce access control.

Core Features & Use Cases

  • Provider-first setup: Guides you to choose the correct auth provider (Convex Auth, Clerk, WorkOS AuthKit, Auth0, or custom JWT) before writing any wiring code.
  • Identity verification in backend: Implements the core pattern of using ctx.auth.getUserIdentity() in protected queries/functions instead of trusting client-provided IDs.
  • Correct wiring and configuration: Ensures you follow provider-specific steps (including convex/auth.config.ts) and the shared Convex auth authorization patterns.
  • Selective user-table storage: Helps you avoid unnecessary app-level users tables when Convex Auth already manages user records.

Quick Start

Tell me which auth provider you want to use for your Convex app and whether you need local-only setup or production-ready setup now.

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?

Setting up Convex authentication involves selecting an auth provider like Clerk or Auth0, configuring `convex/auth.config.ts`, and wiring the client. This establishes verified user identity so backend functions can enforce access control reliably.

How does Convex authorization work for protected functions?

Convex authorization uses `ctx.auth.getUserIdentity()` inside protected queries and mutations to verify user identity. This enforces access control directly within backend functions without trusting client-provided IDs.

Does Convex Auth work with providers like Clerk and WorkOS?

Yes, Convex supports provider-based login with Clerk, WorkOS AuthKit, Auth0, and custom JWT. You configure these providers in `convex/auth.config.ts` and follow provider-specific steps for correct wiring.

Do I need a separate users table when using Convex Auth?

You do not need a separate app-level `users` table when using Convex Auth, as it already manages user records. Avoiding unnecessary user-table storage simplifies your database schema and reduces redundant user management.

What is the best way to enforce access control in Convex backend functions?

The best way to enforce access control in Convex is using `ctx.auth.getUserIdentity()` for authorization checks. This shared pattern ensures protected functions derive a verified user identity rather than trusting insecure client data.