Files
id/pkgs/auth/package.json
zooqueen 35b09872f7 fix(id): rebuild SPA so login POSTs /v1/iam/login + serve via hanzoai/spa
The deployed hanzo.id SPA (id:0.1.7, 26d old) POSTed login to /api/login
with the implicit-flow body type:"token". That path hit the SPA static
catch-all -> index.html (HTML 200) -> JSON.parse threw -> "Unable to sign
in", and even reaching IAM, type:"token" is rejected (implicit flow
disabled). Current source already POSTs /v1/iam/login with
responseType=code; a fresh build of HEAD fixes it.

- Dockerfile: final stage ghcr.io/hanzoai/static:0.4.1 -> hanzoai/spa:1.2.0.
  static's default CSP is `default-src 'none'` (no script-src/connect-src)
  which blanks the SPA and blocks fetch() to IAM; spa serves /public on
  :3000 with index.html fallback and an SPA-safe CSP (frame-ancestors
  'none'). Matches the live deploy contract (containerPort 3000, /health
  probe) exactly.
- LoginForm identifier input stays type="text" (accepts `z` and
  `[email protected]`); forgot/signup keep type="email" (semantically correct).
- Adds social-provider + email/SMS-code login UI (best-effort appLogin),
  and a signupEnabled tenant flag for invite-only tenants.
- Tenant clientId hanzo-id (verified: POST /v1/iam/login app=hanzo-id
  org=hanzo user=z -> {"status":"ok","data":"hanzo/z"}).
- Pin @hanzo/iam to ^0.9.4 (published patch line).
- apps/web 0.1.1 -> 0.1.8.
2026-06-19 10:32:01 -07:00

34 lines
806 B
JSON

{
"name": "@hanzo/id-auth",
"version": "0.1.0",
"description": "Composable login / signup / OTP / OAuth-PKCE flows on top of @hanzo/iam. UI primitives in @hanzo/gui.",
"license": "BSD-3-Clause",
"type": "module",
"main": "./src/index.ts",
"types": "./src/index.ts",
"exports": {
".": "./src/index.ts",
"./client": "./src/client.ts",
"./forms": "./src/ui/index.ts",
"./package.json": "./package.json"
},
"files": ["src"],
"scripts": {
"tc": "tsc --noEmit"
},
"dependencies": {
"@hanzo/id-shared": "workspace:*",
"@hanzo/iam": "^0.9.4"
},
"peerDependencies": {
"react": ">=19",
"react-dom": ">=19"
},
"devDependencies": {
"@types/react": "^19.0.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"typescript": "^5.9.3"
}
}