convex-setup-auth

Configure Convex authentication providers and enforce server-side identity checks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you correctly set up authentication in Convex so you can safely identify users and enforce access control in backend functions.

Core Features & Use Cases

  • Provider Selection & Wiring: Guides you to choose and configure the right auth provider (Convex Auth, Clerk, WorkOS AuthKit, Auth0, or custom JWT) and integrate it into the client and Convex backend.
  • Identity-First Access Control: Shows the correct pattern of using server-side identity checks (via ctx.auth.getUserIdentity()) instead of trusting client-provided user IDs.
  • Production-Ready Checklist: Includes environment variable setup, deployment parity considerations, and validation steps to confirm authenticated state end-to-end.

Quick Start

Tell the AI to set up Convex authentication for your chosen provider and walk through the required files and environment variables until ctx.auth.getUserIdentity() is non-null in protected functions.

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 other providers?

Convex authentication is set up by selecting your provider, updating `convex/auth.config.ts`, and wiring environment variables. This Skill guides provider configuration for Clerk, Convex Auth, WorkOS AuthKit, Auth0, or custom JWTs in local and production.

Why is ctx.auth.getUserIdentity() returning null in my Convex protected functions?

`ctx.auth.getUserIdentity()` returns null when provider wiring is incomplete or environment variables are misconfigured. Validate your `convex/auth.config.ts` mappings and ensure authenticated state works end-to-end across local and production.

How do I prevent trusting client-supplied user identifiers in Convex backend queries?

Prevent trusting client-supplied user identifiers by implementing identity-first access control using server-side checks with `ctx.auth.getUserIdentity()` to enforce authorization before processing backend queries.

Can I use custom JWT authentication with Convex instead of Clerk?

Custom JWT authentication is supported alongside Clerk, Convex Auth, WorkOS AuthKit, and Auth0. You must select the correct provider and update `convex/auth.config.ts` to map user identity for your specific JWT scenario.

What's the best way to configure environment variables for Convex auth in production?

Configure environment variables for production by ensuring deployment parity with local settings and validating authenticated state end-to-end. This Skill provides a production-ready checklist covering environment variable setup and validation steps.

Does convex-setup-auth support WorkOS AuthKit configuration?

WorkOS AuthKit is fully supported for first-time Convex auth initialization and ongoing configuration. The Skill guides provider selection, client integration, and backend wiring to ensure `ctx.auth.getUserIdentity()` returns proper identity.