Files
market/docs/auth.md
zeekay 661a6a28d5 rebrand: Bot Hub → Hanzo Market, white-label via @luxfi/brand schema
- Repo transferred hanzobot/hub → hanzoai/market (matches owned hanzo.market domain)
- npm package: bothub → @hanzoai/market, packages/bothub → packages/market
- bothub-schema → @hanzoai/market-schema
- CLI binary: bothub → market
- Brand: Bot Hub → Hanzo Market across ~95 user-facing surfaces (README, docs, k8s,
  Dockerfile, public/manifest.json, OG image, CLI banner, site config, theme)
- Brand-neutral white-label: src/brand/ owns BrandConfig + BrandTheme + loader,
  public/brands/<id>.json presets for hanzo, zoo, lux, pars, liquidity, generic
- BRAND_ID env at build picks default; ConfigMap-mounted brand.json overrides at runtime
- Legacy paths retained for compat: ~/.bothub, .bothubignore, /.well-known/bothub.json,
  bothub-theme localStorage key, LEGACY_HOSTS for hub.hanzo.bot/clawhub.ai
- Fixed broken sed-replace artifacts in packages/market/src/cli/botConfig.test.ts
- Drops Clawd/OpenClaw dead brand surface, keeps Clawdis* schema types and
  clawd skill directory paths (backward compat for installed bot products)
2026-05-29 13:46:09 -07:00

1.3 KiB

summary, read_when
summary read_when
Auth overview: Hanzo IAM OIDC (web) + API tokens (CLI).
Working on login/token flows
Debugging 401s

Auth

Web auth (Hanzo IAM)

  • Hanzo IAM is the only supported identity provider (OIDC).
  • Env vars:
    • IAM_URL (default https://hanzo.id)
    • IAM_CLIENT_ID
    • IAM_CLIENT_SECRET
    • SITE_URL (used by auth callback)

Local setup steps are in the repo root README.md.

API tokens (CLI)

The CLI uses a long-lived API token (Bearer token) for publish/sync/delete.

Browser flow (default)

market login does:

  1. Starts a loopback HTTP server on 127.0.0.1 (random port).
  2. Opens <site>/cli/auth?redirect_uri=http://127.0.0.1:<port>/callback&state=....
  3. Web UI requires Hanzo IAM login, then creates a token and redirects back to the loopback server.
  4. CLI stores the token in the global config file.

Headless flow

Create a token in the web UI (Settings → API tokens) and paste it:

market login --token clh_...

Token storage

Default global config path:

  • macOS: ~/Library/Application Support/market/config.json

Override:

  • MARKET_CONFIG_PATH=/path/to/config.json (legacy BOTHUB_CONFIG_PATH, CLAWDHUB_CONFIG_PATH)

Revocation

  • Tokens can be revoked in the web UI.
  • Revoked tokens return 401 Unauthorized on CLI endpoints.