Skip to content

JoeAuth Developer Document

JoeAuth is an OAuth 2.0 + PKCE (S256) + OpenID Connect (OIDC) Identity Provider using Ed25519 (EdDSA) JWTs, running on Cloudflare Workers.

  • OAuth 2.0 & OIDC Reference — Discovery metadata, JWKS multi-key rotation, authorization parameters (prompt, login_hint, max_age), token grants (authorization_code, refresh_token, client_credentials, device_code), userinfo, introspect, revoke, end_session_endpoint, and JWT claims.
  • Developer Account Control API — Scoped, named, expiring Developer Personal Access Tokens (jat_...) to programmatically manage apps, rotate secrets, upload logos, configure delegation, and update developer account settings.
  • Cross-App Delegated Authorization — Cross-app delegated access tokens, request_delegation/delegation scopes, target blacklist control, batch selective consent, anti-enumeration rules, delegation_refresh, revocation, and stateless Target Worker JWKS verification.
  • Token Verification & Webhooks — Token exchange, M2M client_credentials, introspection, zero-dependency local Ed25519 JWT verification (Cloudflare Workers & Python), and X-JoeAuth-Signature HMAC-SHA256 webhook verification.
  • Framework Integration Presets — Ready-to-use configuration snippets for Auth.js / NextAuth v5, Hono (oauth4webapi), FastAPI (Authlib), Go (go-oidc), and Public SPAs (PKCE S256).

  1. Register an account at /register (gated by admin-configured email regex rules — approve-nothing by default).
  2. Apply for developer access at /developer and wait for Admin or Superuser approval.
  3. Create an OAuth application in /developer (activated immediately):
    • Choose confidential (server-side backend with a one-time client_secret) or public (SPA / mobile / CLI app without a client_secret, where PKCE S256 is mandatory).
    • Register exact redirect_uris and optional post_logout_redirect_uris.
    • Optionally upload a 256x256 PNG app logo, set an optional globally-unique Custom App ID (app_slug, cannot start with ja_, enabling readable references like example_app:service), set description / privilegeDescription, or configure an https:// lifecycle webhook URL.
    • Check request_delegation under Allowed Scopes to ask for delegated tokens for other apps, and/or delegation to allow other apps to receive delegated tokens for this app (both self-service, no admin approval required). Configure custom target scopes and optional blocked_source_apps blacklist in the app’s Delegation panel.
  4. Authenticate users via /oauth/authorize with PKCE (S256) (or via Device Authorization Grant at /api/oauth/device_code + /device), exchange codes at /api/oauth/token, and verify tokens via /.well-known/jwks.json or /api/oauth/introspect.
  5. Debug & inspect integration errors in /developer using the per-app OAuth Error Logs viewer and inline browser Ed25519 JWT Inspector, or use the local OAuth test client (npm run test:server on http://127.0.0.1:8788).
  6. Automate with the Dev Account Control API: Generate scoped API tokens (jat_...) in /developer under Account Control API Tokens (see Developer Account Control API).

Scopes are fixed globally to keep consent clear and predictable (while Target Apps define their own arbitrary delegation scopes under Cross-App Delegated Authorization):

Scope Claims / Behavior
openid Returns user identifier sub and issues an OIDC id_token
profile Includes name, picture (256x256 PNG or generated SVG avatar URL), role, and developer_status
email Includes email and email_verified
offline_access Issues a 30-day rotating opaque refresh_token
request_delegation Allows this app to request delegated tokens for other apps
delegation Allows other apps to receive delegated tokens to access this app (delegation_mode = "public")