Getting Started
@idhub solves the anonymous → known-user transition once, instead of once
per vendor per app. One canonical anonymous id is generated upstream of every
vendor SDK and handed to all of them; your app calls identify() a single
time at login, and the client fans that call out to every registered
provider — Segment, LaunchDarkly, and FullStory today, with more vendors
addable without touching existing code.
Install
Install the core package plus the adapter for your framework and a provider package per vendor you use:
pnpm add @idhub/identity-core @idhub/identity-adapter-nextjs \
@idhub/identity-provider-segment @idhub/identity-provider-launchdarkly @idhub/identity-provider-fullstory
Using Angular instead of Next.js? Swap the adapter package:
pnpm add @idhub/identity-core @idhub/identity-adapter-angular \
@idhub/identity-provider-segment @idhub/identity-provider-launchdarkly @idhub/identity-provider-fullstory
Only need one vendor? Install just that provider package — each one depends
only on @idhub/identity-core, never on the others.
What you get
- One anonymous id, generated in a first-party cookie before any vendor SDK loads, instead of each vendor racing to set its own.
- One
identify(userId, traits)call at login that fans out to every registered provider consistently — no more per-page, per-vendor drift. - One
reset()call at logout that issues a fresh anonymous id, so a second person on a shared device never inherits the first person's history. - Framework-idiomatic wiring — Next.js middleware + React context + hook, or an Angular module + injectable service — with zero vendor-specific code leaking into your application code.
Next steps
- Architecture — the 3-layer design and the identity state machine.
- Examples: Next.js · Angular — real, copy-pasteable integration code.
- FAQ — how it works, what it costs, and what problem it solves.
All @idhub packages are published to the public npm registry and licensed
MIT — free, with no paid tier.