SDKs And Examples¶
Use this page when you need to pick the package closest to your app runtime.
Default for interactive login: hosted helpers (@sigid/start or a framework
package). Use low-level @sigid/client OAuth helpers only when you need full
protocol control.
Start By Runtime¶
| Runtime | First guide | First package |
|---|---|---|
| Plain HTML / static site | Add Login (zero-build) | @sigid/start / CDN sigid.js |
| React SPA | React SPA Quickstart | @sigid/react (+ @sigid/client) |
| Next.js App Router | Next.js Quickstart | @sigid/next |
| Svelte SPA | Add Login | @sigid/svelte |
| SvelteKit | Add Login | @sigid/sveltekit |
| Backend API only | Backend API Quickstart | validate tokens; no browser SDK required |
| Cold agent / CLI | Agent Self-Serve Quickstart | @sigid/cli / sigid-cli |
| Local lab | Run The Example App | examples/sdk-lab-next |
| Third-party agent checklist | Integrate Third-Party App | start → framework → client |
Package Tiers¶
@sigid/start # two-line browser drop-in (prefer for simple UIs)
↓ uses
@sigid/client # full browser OAuth/session engine
↑ wrapped by
@sigid/react|next|svelte|sveltekit # framework glue (SSR, cookies, hooks)
| Runtime | Package | Use it for |
|---|---|---|
| Any browser (no build) | @sigid/start |
CDN script, declarative data-sigid UI, inline callback |
| Browser TypeScript | @sigid/client |
createSigIdClient, login/callback, validateAccessToken |
| React | @sigid/react |
Provider, hooks, sign-in buttons on top of client |
| Next.js | @sigid/next |
Route handlers, cookies, requireAuth / requireAccessToken |
| Svelte | @sigid/svelte |
Stores and actions for SPA-style Svelte |
| SvelteKit | @sigid/sveltekit |
Hooks, cookies, server handlers |
| CLI / agents | @sigid/cli |
npm wrapper for native sigid-cli (setup, device flow, …) |
Backend SDKs¶
| Runtime | Directory | Use it for |
|---|---|---|
| Go | sdks/go |
Go services, CLIs, infrastructure tooling |
| Rust | sdks/rust |
Rust services and security-sensitive integrations |
| Elixir | sdks/elixir |
Phoenix / BEAM services |
For languages without an official SDK, use standard OAuth/OIDC libraries plus discovery and Verify Access Tokens.
What Does Not Exist (Do Not Install)¶
These names appear in older drafts or wishlists. They are not published packages:
@sigid/vue,@sigid/solid,@sigid/solidstart@sigid/expo,@sigid/electron
Use @sigid/start or @sigid/client instead until a first-party adapter ships.
Drop-In Script (Preferred Zero-Build Path)¶
<script
src="https://cdn.sigid.org/v1/sigid.js"
data-client-id="YOUR_CLIENT_ID"
data-issuer="https://auth.sigid.org"
></script>
<a href="#" data-sigid="login">Sign in</a>
- Canonical CDN:
https://cdn.sigid.org/v1/sigid.js - Mirror:
https://www.sigid.org/v1/sigid.js - npm:
import { createSigIdStart } from "@sigid/start"(side-effect free; no auto-init) - Example:
examples/sigid-start/
Framework apps that already use React/Next/SvelteKit should use the matching package for SSR and cookies. You can still load start on a static marketing page of the same product.
Example Apps¶
| Example | Path | Notes |
|---|---|---|
| Drop-in start | examples/sigid-start/ |
Canonical two-line demo |
| Next quickstart | examples/next-app/ |
@sigid/next + client |
| SvelteKit | examples/sveltekit/ |
hooks + protected page |
| SDK Lab Next | examples/sdk-lab-next/ |
Full golden path (client-centric) |
| Demo | demo/ |
start vs client profile modes |
Recommended Order¶
- Integrate Third-Party App if you are an agent wiring a foreign repo.
- Runtime quickstart or zero-build start snippet.
- Verify Access Tokens on the backend.
- Protect Backend APIs.
- Webhooks / Commerce / Agent quickstart only if needed.
API Schemas¶
- Public integrator OpenAPI: committed
openapi-public.json; production may serveGET /openapi.jsonwithopenapi.exposure = "public". - Full internal OpenAPI is for non-production diagnostics only.
Continue to API And SDK Reference.