skillfed

clerk-backend-apis

This skill guides you through authenticating and authorizing incoming requests on backend services using Clerk's SDKs and middleware. It covers request flow, token verification, cross-origin patterns, proxy header preservation, and Backend API client usage across Node, Go, Python, Ruby, Java, C#, and PHP frameworks.

Clerk Backend APIs helps you authenticate incoming backend requests using Clerk tokens and middleware across multiple frameworks.

AI-generated summary based on this skill's SKILL.md

49 10 MIT updated by JosiahSiegel

Install

JosiahSiegel/claude-plugin-marketplace/clerk-backend-apis · repository language: Shell

git clone https://github.com/JosiahSiegel/claude-plugin-marketplace
cp -r claude-plugin-marketplace/plugins/clerk-auth-master/skills/clerk-backend-apis ~/.claude/skills/clerk-backend-apis
npx skillfed install JosiahSiegel/claude-plugin-marketplace/clerk-backend-apis

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I authenticate requests in Node.js with Clerk?

clerk-backend-apis provides middleware and SDK patterns for Node.js frameworks. In Express, use the Clerk middleware to automatically verify Bearer tokens in the Authorization header and attach user/session context to the request object. For other frameworks like Fastify, Clerk offers framework-specific plugins that follow the same token-verification flow. The middleware validates Clerk session tokens, checks their expiration, and rejects unauthenticated requests with 401 responses.

What does clerk-backend-apis cover for authorization?

clerk-backend-apis guides you through implementing authorization checks for protected API resources and actions. After authentication verifies the user's identity via token validation, authorization determines what that user can access. The skill covers role-based access control patterns, permission checks, and organization-level authorization using Clerk's Backend API client for server-side user and organization operations.

How should I handle cross-origin API calls with Clerk tokens?

clerk-backend-apis covers CORS configuration and Bearer token handling for cross-origin requests. When frontend clients make requests to backend APIs from different origins, include the Clerk session token in the Authorization header as a Bearer token. Configure your backend's CORS policy to accept requests from your frontend domain, and ensure the Clerk middleware validates the Bearer token before processing the request.

What authentication patterns does clerk-backend-apis support?

clerk-backend-apis supports authentication across Node, Go, Python, Ruby, Java, C#, and PHP frameworks. It covers standard Bearer token validation, middleware-based request authentication, Backend API client setup for server-side operations, machine-to-machine authentication, and webhook signature verification. Each framework has language-specific examples and SDK guidance for integrating Clerk's authentication into your backend service.

How do I debug authentication failures with proxies and forwarded headers?

clerk-backend-apis addresses debugging authentication failures in proxies, CDNs, and forwarded header scenarios. When requests pass through reverse proxies or load balancers, ensure the Authorization header containing the Clerk token is preserved and forwarded to your backend. Check that proxy configurations don't strip or modify headers, and verify that your backend correctly reads tokens from the Authorization header rather than expecting them in cookies.

What's included in the clerk-backend-apis integration checklist?

clerk-backend-apis provides a backend integration checklist covering token verification setup, middleware configuration for your framework, CORS and cross-origin handling, Bearer token validation, authorization pattern implementation, Backend API client initialization, error handling for 401/403 responses, and proxy header preservation. The skill is licensed under MIT and guides you through each step to secure your backend API endpoints.

SKILL.md

rendered from the published skill — quoted content, verbatim

Clerk Backend APIs

Overview

Use this skill for Clerk authentication in backend services, API servers, workers, and server-to-server integrations. The key responsibilities are authenticating incoming requests, enforcing authorization on server resources, safely using the Backend API, and making cross-origin token behavior explicit.

Prefer official Clerk SDKs and middleware when available. When the target runtime lacks a first-class Clerk framework SDK, use Clerk-documented token verification and Backend API patterns rather than ad hoc JWT

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
plugins/clerk-auth-master/skills/clerk-backend-apis/SKILL.md

Related skills

Tags

server-side-auth token-verification api-middleware cross-origin-security backend-patterns machine-to-machine proxy-forwarding webhook-validation authorization-enforcement