convex-setup-auth

Configure authentication providers and access control for Convex apps.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/RestartDK/project-europe --skill convex-setup-auth-restartdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-setup-auth
Source: https://github.com/RestartDK/project-europe/tree/main/.agents/skills/convex-setup-auth
Command: npx skills add https://github.com/RestartDK/project-europe --skill convex-setup-auth-restartdk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Convex apps often struggle to implement secure, scalable authentication and authorization. This skill provides a guided setup to wire authentication providers, map user identity to Convex, and enforce access controls across the backend and UI.

Core Features & Use Cases

  • Supports multiple auth providers (Convex Auth, Clerk, WorkOS AuthKit, Auth0, or custom JWT) and handles provider wiring.
  • Creates and protects a users identity mapping (or app-level user storage) and supports role-based access control.
  • Ensures backend functions use ctx.auth.getUserIdentity() and exposes gated UI patterns to enforce authorization.

Quick Start

Choose your auth provider and start the setup to wire Convex Auth, 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 set up authentication in a Convex app?

To set up Convex authentication, you wire an identity provider into convex/auth.config.ts and create a users table for identity mapping. This ensures protected backend functions can validate sessions using ctx.auth.getUserIdentity().

What auth providers can I integrate with Convex for access control?

You can integrate Convex Auth, Clerk, WorkOS AuthKit, Auth0, or custom JWT providers with Convex. The setup handles provider wiring and supports run-time decisions to enforce role-based access control across your backend.

How does identity mapping work for RBAC in Convex?

Identity mapping for RBAC in Convex works by linking your auth provider's identity to a local users table. This allows your backend to run authorization checks and enforce role-based access control before exposing gated UI patterns.

Can I use Clerk or WorkOS AuthKit with Convex for user authentication?

Yes, you can use Clerk or WorkOS AuthKit with Convex for user authentication. The setup guides you through provider wiring and configuring convex/auth.config.ts to map identities for secure backend access.

How do I protect Convex backend functions with authorization checks?

To protect Convex backend functions with authorization checks, you enforce access controls by calling ctx.auth.getUserIdentity() within your functions. This verifies the user identity mapped from your configured auth provider.