This wraps PinMe's Identity Platform auth proxy so your TypeScript Workers can create email/password users, verify id_tokens, and query user info without managing Firebase admin SDKs directly. You get four endpoints: create_user (sends verification emails automatically), verify_token (returns 403 specifically for unverified emails, not 401), get single user, and list users with pagination up to 1000 per page. Everything authenticates with X-API-Key header plus project_name query param, which the proxy maps to your tenant_id before hitting Google Identity Platform. The separation between server API_KEY and public auth_api_key for frontend Firebase init is clean. Useful if you're building on PinMe and want backend auth logic without pulling in heavyweight dependencies.

skills.sh installs
511
GitHub stars
3.8K
last updated
Aug 21, 2026

Install

$ npx -y skills add glitternetwork/pinme --skill pinme-auth --agent claude-code

Installs into .claude/skills of the current project.

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
}

Sponsors

Details

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

More from glitternetwork/pinme

All 5
1intellectronica avatarraindrop-apiintellectronica/agent-skillsThis skill provides comprehensive instructions for interacting with the Raindrop.io bookmarks service via its REST API using curl and jq. It covers authenticati507skills.sh installs
2secondsky avatarapi-security-hardeningsecondsky/claude-skillsREST API security hardening with authentication, rate limiting, input validation, security headers. Use for production APIs, security audits, defense-in-depth, 506skills.sh installs
3aj-geddes avatardatabase-migration-managementaj-geddes/useful-ai-promptsManage database migrations and schema versioning. Use when planning migrations, version control, rollback strategies, or data transformations in PostgreSQL and 504skills.sh installs
4aj-geddes avatarapi-reference-documentationaj-geddes/useful-ai-promptsCreate comprehensive API reference documentation with OpenAPI/Swagger specs, REST endpoints, authentication, examples, and SDKs. Use when documenting REST APIs,499skills.sh installs
5yoanbernabeu avatarsupabase-extract-db-stringyoanbernabeu/supabase-pentest-skillsCRITICAL - Detect exposed PostgreSQL database connection strings in client-side code. Direct DB access is a P0 issue.499skills.sh installs
6next-safe-action avatarsafe-action-better-authnext-safe-action/skillsUse when adding authentication or authorization to safe actions with Better Auth -- covers betterAuth() middleware setup, typed session context (BetterAuthConte496skills.sh installs