Skip to main content

Client SDKs

IdentSphere ships two JavaScript/TypeScript client packages and six other language clients. They all talk to the same HTTP API documented in the API reference — pick the one that fits your runtime.

The JavaScript / TypeScript options

@identsphere/core

Framework-agnostic, zero-dependency client. No React, no DOM, no runtime dependencies — it runs anywhere fetch exists: the browser, React Native, Node 18+, Deno, Bun, and Cloudflare Workers.

It wraps the whole auth REST surface with typed methods, a single-flight refresh-and-retry engine, and an auth-state event stream. Reach for it when the DOM-bound React binding doesn't fit your runtime — a React Native / Tamagui app, a non-React framework, a backend-for-frontend, or an edge worker.

@identsphere/react

The official React binding: typed hooks for every endpoint, a provider, route guards, and an HTTP client that handles refresh + CSRF for you. It builds on the same surface as @identsphere/core and works on the web and in React Native.

See the existing TypeScript / React integration guide.

note

The @identsphere/react API is being revised. This documentation focuses its detailed reference work on @identsphere/core and the universal guide, which are stable. For the current React hook list, see the integration guide.

Which package do I use?

Your appUseWhy
React on the web (first-party app + auth backend)@identsphere/reactHooks, guards, provider, cookie + CSRF handled for you
React Native / Expo / Tamagui@identsphere/core (bearer mode)DOM-free; you build the UI against typed methods
Non-React web framework (Svelte, Vue, Solid, vanilla)@identsphere/core (cookie mode)Framework-agnostic; bring your own UI
Node / Deno / Bun backend-for-frontend@identsphere/coreRuns server-side; see the cookie-jar note
Cloudflare Workers / edge@identsphere/coreZero deps, Web-standard fetch; see the cookie-jar note

@identsphere/react uses @identsphere/core under the hood, so the wire contract and error model are identical across both.

Other language clients

For non-JavaScript stacks, IdentSphere publishes six additional clients. These follow the sidecar / JWT-validation patterns rather than embedding auth logic in your app:

Any language without a dedicated client can drive the API directly over raw REST.

What every client shares

  • The HTTP contract. The same ~40 endpoints, documented in the API reference.
  • The token format. Standard RS256 JWTs with documented claims.
  • The error model. A stable error envelope with machine codes — see Errors.