auth-setup

Set up token-based authentication and access control for Convex applications.

7|1|Updated Nov 6, 2025
One-click install
npx skills add https://github.com/robertguss/web-app-starter-kit --skill auth-setup-robertguss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth-setup
Source: https://github.com/robertguss/web-app-starter-kit/tree/main/.claude/skills/auth-setup
Command: npx skills add https://github.com/robertguss/web-app-starter-kit --skill auth-setup-robertguss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Set up a secure authentication layer for Convex applications with user management, identity mapping, and access control patterns to enforce scalable auth flows.

Core Features & Use Cases

  • User management: Create and map identity providers to application users, with token-based identity resolution.
  • Access control patterns: Admin roles, owner rights, and team-based permissions to protect resources.
  • Helper utilities: Ready-to-use functions like getCurrentUser and requireAdmin for enforcing auth checks and authorization across server functions.

Quick Start

Implement the authentication setup in your Convex app by wiring the users table with a tokenIdentifier index, adding the storeUser mutation for first sign-in, and applying the helper functions in protected operations.

Frequently Asked Questions about auth-setup

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

FAQPage Schema
How do I set up authentication in a Convex application?

To set up authentication in a Convex application, you wire a users table with a tokenIdentifier index, add a storeUser mutation for first sign-in, and apply helper functions like getCurrentUser in protected operations to enforce secure auth flows.

What is token-based identity resolution for user management?

Token-based identity resolution maps identity providers to application users using token identifiers, ensuring secure user management and consistent authentication across server and client boundaries during first sign-in scenarios.

How do I enforce admin and owner access control in Convex?

You enforce admin and owner access control in Convex by applying ready-to-use helper functions like requireAdmin and implementing owner or team-based permission patterns within your protected server functions to restrict resource access.

Can I use this authentication setup for team-based permissions?

Yes, this authentication setup supports team-based permissions by implementing owner and team access patterns, allowing you to protect resources across client and server boundaries with robust error handling.

What's the best way to handle first sign-in user creation in Convex?

The best way to handle first sign-in user creation in Convex is by adding a storeUser mutation that maps the token identifier to a new application user, ensuring secure identity mapping on initial authentication.

Why does my getCurrentUser helper return an authentication error?

Your getCurrentUser helper returns an authentication error when identity resolution via token identifiers fails, which is part of its robust error handling to prevent unauthorized access to protected server operations.