mirror of
https://github.com/hanzoai/id.git
synced 2026-10-16 18:38:15 +00:00
hanzo.id is where every property's visitor lands and it reported nothing — the live bundle carries no @hanzo/event, no /v1/event and no key — so the arrival->session funnel had no denominator. Mounts the ONE @hanzo/event client (product `id`, POST /v1/event) for pageviews and errors, anonymously: no identify(), no interaction autocapture, no session replay, no input capture, no email/name. A visitor's pre-signup pageviews still join to whoever they become, because the client's per-browser anonymousId survives sign-up and a post-auth surface identifies them there. Telemetry is refused outright on /callback and /login/oauth/device. Passing a clean pathname is NOT sufficient protection on those routes: @hanzo/event stamps `url: window.location.href` onto every event it assembles, independently of the `path` a caller passes, and its scrubber redacts secret SHAPES (JWT, sk-/pk-, bearer, cloud keys, PAN) — an opaque OAuth authorization code is none of them. Measured against the real client, a pageview from /callback?code=…&state=… put the code and state on the wire while `path` read a tidy /callback. Neither route is a funnel step; both are transient hops that redirect onward, and /, /login and /onboarding still report. analytics.test.ts asserts BOTH that the gated routes emit nothing and that the ungated client really does leak, so the gate cannot decay into a decorative assertion. The key is a publishable pk- read from KMS (deploy/EVENT_INGEST_KEY, env prod) and passed as a build-arg. The build fails closed on an empty or non-publishable value, then asserts the key actually reached dist: a green build that ships an unattributed bundle is the failure mode here, not a red one. No auth logic is touched — no OAuth/OIDC/PKCE, token storage, session restore, or login template. 167 tests pass. Co-authored-by: Hanzo Dev <[email protected]>
20 lines
496 B
JSON
20 lines
496 B
JSON
{
|
|
"name": "@hanzo/id",
|
|
"private": true,
|
|
"version": "0.2.28",
|
|
"description": "Hanzo ID — white-label login + identity verification portal (Vite + @hanzo/gui)",
|
|
"packageManager": "[email protected]",
|
|
"scripts": {
|
|
"build": "pnpm -r build",
|
|
"dev": "pnpm --filter @hanzo/id-web dev",
|
|
"tc": "pnpm -r tc",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"clean": "bash scripts/clean.sh"
|
|
},
|
|
"devDependencies": {
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^3.2.4"
|
|
}
|
|
}
|