Skip to content

Server-side wrapper for PinMe Identity Platform auth proxy APIs in Worker TypeScript projects.

CCM score
75 of 100
skills.sh installs
528
GitHub stars
3.8K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers four endpoints: create user, verify id_token, get a single user by uid, and list users with pagination
  • Authenticates every call with X-API-Key and project_name, which must belong to the same project
  • Rejects unverified emails with HTTP 403 on token verification, distinct from the 401 for invalid tokens
  • Designed for PinMe Worker projects that need email/password signup, token checks, and user lookups

Install

$ npx -y skills add glitternetwork/pinme --skill pinme-auth -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

PinMe Worker Auth API Integration

Guides how to call PinMe platform's Identity Platform auth proxy APIs in a PinMe Worker (TypeScript).

Environment Variables

// backend/src/worker.ts
export interface Env {
  DB: D1Database;
  API_KEY: string;       // 项目 API Key — 用于所有 auth 接口认证
  PROJECT_NAME: string;  // 项目名 — 所有 auth 接口必须同时传递
  BASE_URL?: string;     // 可选,默认 https://pinme.cloud
}

API_KEY 和 PROJECT_NAME 是所有 auth 接口的必填凭证,缺一不可。


认证方式(所有接口通用)

参数传递方式必填说明
X-API-Key请求头是项目 API Key
project_nameQuery 参数是必须与 X-API-Key 对应同一个项目

服务端会先校验这两个字段是否匹配同一个项目,再从项目配置中取出 tenant_id,然后转调 Identity Platform。


通用错误

场景HTTPdata.error
缺少 X-API-Key401X-API-Key header is required
缺少 project_name400project_name is required
API Key 和项目不匹配401Invalid API key or project name
项目未配置认证租户400Auth service not configured for this project

通用 TypeScript 类型

type ApiEnvelope<T> = {
  code: number   // 200=成功,其他=失败
  msg: string    // "ok" | "fail" | "invalid param"
  data: T
}

Details

Repository
github.com/glitternetwork/pinme
Category
Backend & APIs
License
MIT
First seen
Jun 3, 2026

Questions

What does the pinme-auth skill let an agent build in a PinMe Worker?

The pinme-auth skill guides an agent to add user authentication to a PinMe Worker written in TypeScript. It covers creating email and password users, verifying id_tokens, querying a single user, and listing users through the Identity Platform auth proxy APIs.

How do I install the pinme-auth skill?

Run npx -y skills add glitternetwork/pinme --skill pinme-auth -y inside your project. Once installed, the agent can write the Worker code that calls the PinMe auth endpoints.

What credentials does the pinme-auth integration need?

Every auth call needs a project API key sent as the X-API-Key header and a project_name query parameter, and both must belong to the same project. The Worker also needs a DB binding in its Env interface, and an optional BASE_URL overrides the default platform address.

Which skills lead the Backend and APIs category alongside pinme-auth?

In the Backend and APIs category, pinme-auth sits next to entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices. Those skills cover other backend and identity topics, while pinme-auth focuses on PinMe Worker user accounts and token checks.

More from glitternetwork/pinme

All 5

Similar to Pinme Auth

More Backend & APIs