convex-auth

Authenticate users across Convex backends using ctx.auth.getUserIdentity() for queries and mutations.

17|3|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/PolarCoding85/convex-agent-skillz --skill convex-auth-polarcoding85
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-auth
Source: https://github.com/PolarCoding85/convex-agent-skillz/tree/main/.claude/skills/convex-auth-skill
Command: npx skills add https://github.com/PolarCoding85/convex-agent-skillz --skill convex-auth-polarcoding85

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Universal authentication and identity verification across Convex backends, enabling consistent access control with provider-agnostic patterns and robust integration points.

Core Features & Use Cases

  • Provides a uniform API to fetch user identity via ctx.auth.getUserIdentity() for queries, mutations, actions, and HTTP endpoints.
  • Includes guidance for storing and retrieving user records in the Convex database, wrappers, and debugging utilities to diagnose auth issues.
  • Supports multiple providers (Clerk, WorkOS, Auth0, etc.) and ensures token identity consistency across deployments.

Quick Start

Authenticate a user by calling ctx.auth.getUserIdentity() inside a function and enforce access checks before proceeding.

Frequently Asked Questions about convex-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate users in Convex queries and mutations?

Use ctx.auth.getUserIdentity() inside your queries and mutations to fetch the user identity, then enforce access checks before proceeding with the function logic.

Can I use Clerk or Auth0 for identity verification with Convex backends?

Yes, Convex authentication patterns are provider-agnostic, supporting identity verification with Clerk, Auth0, WorkOS, and others while ensuring token identity consistency across deployments.

What is the best way to store user records in a Convex database after authentication?

Retrieve the identity object via ctx.auth.getUserIdentity() and apply the included guidance to safely store and retrieve these user records within your Convex database mutations.

Why is my Convex HTTP endpoint allowing unauthenticated access?

Your Convex HTTP endpoint likely lacks safe wrappers. Without applying safe wrappers around ctx.auth.getUserIdentity(), your endpoints cannot properly enforce access checks to prevent unauthenticated access.

How do I debug authentication issues in Convex actions?

Debug authentication issues in Convex actions by using the included debugging utilities to diagnose token identity consistency and access control problems across your provider-agnostic setup.