cometchat-production

Implement server-side CometChat token authentication and user-management CRUD.

Updated May 28, 2026
One-click install
npx skills add https://github.com/MAX5271/CometChat --skill cometchat-production-max5271
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cometchat-production
Source: https://github.com/MAX5271/CometChat/tree/main/.claude/skills/cometchat-production
Command: npx skills add https://github.com/MAX5271/CometChat --skill cometchat-production-max5271

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents insecure CometChat production deployments by moving authentication and user management to secure server-side endpoints instead of relying on client-exposed keys.

Core Features & Use Cases

  • Token-based authentication hardening: Replaces client-side authKey usage with server-side auth token generation and loginWithAuthToken.
  • Server-side user management CRUD: Creates, updates, and deletes CometChat users via the REST API (e.g., on signup, profile updates, and account deletion).
  • Operational guardrails: Covers environment variable separation, refresh handling for expiring tokens, and a production security checklist to reduce risk.

Quick Start

Ask the AI to guide you through implementing a server token endpoint that issues short-lived CometChat auth tokens using your REST API key, then update your frontend to authenticate with authToken instead of authKey.

Frequently Asked Questions about cometchat-production

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

FAQPage Schema
How do I secure CometChat authentication for a production deployment?

Server-side token authentication replaces client-exposed auth keys by having your backend generate short-lived CometChat auth tokens via the REST API. The frontend then uses loginWithAuthToken to establish safe authenticated sessions without exposing credentials.

How do I synchronize CometChat users with my application database?

Synchronize CometChat users with your application database by implementing server-side CRUD operations via the REST API. Trigger user creation, updates, and deletions from your authenticated backend during signup, profile changes, and account deletion.

What is the best way to generate CometChat auth tokens without exposing API keys?

Generate CometChat auth tokens without exposing keys by using server-only REST API credentials. Your backend derives the UID strictly from the authenticated session and issues tokens through protected endpoints, keeping credentials entirely server-side.

Do I need a security checklist for CometChat production auth and user management?

A production security checklist is needed to reduce risk in CometChat deployments. It should cover environment variable separation, refresh handling for expiring tokens, strict UID derivation, and rate-limit considerations for authenticated server endpoints.

Why does CometChat loginWithAuthToken fail when using client-side keys?

Using client-side keys for CometChat login fails because production hardening requires server-side token generation using REST API credentials. Client-exposed auth keys lack the secure context needed for strict UID derivation and authenticated endpoint protection.