SDKs And Examples¶
Use this page when you need to pick the package closest to your app runtime.
Start with hosted-login helpers. Use low-level OAuth helpers only when your app needs full protocol control.
Start By Runtime¶
| Runtime | First guide |
|---|---|
| Next.js App Router | Next.js Quickstart |
| React SPA | React SPA Quickstart |
| Backend API only | Backend API Quickstart |
| Local working example | Run The Example App |
Choose An SDK¶
Inspect the workspace to identify the runtime (framework config, package.json, go.mod, Cargo.toml, mix.exs), then install only the matching package from this table: hosted-login helpers like @sigid/next or @sigid/react for frontend/full-stack, or the sdks/go, sdks/rust, sdks/elixir paths for backend languages.
Frontend frameworks also need @sigid/client as the underlying browser client.
Confirm the choice with the user if the repository contains multiple runtimes.
| Runtime | Package or path | Use it for |
|---|---|---|
| Browser TypeScript | @sigid/client |
Hosted login, callback handling, logout, and client session helpers. |
| React | @sigid/react |
React hooks and session state. |
| Vue | @sigid/vue |
Vue composables. |
| Solid | @sigid/solid |
Solid primitives. |
| Svelte | @sigid/svelte |
Svelte stores. |
| Next.js | @sigid/next |
Route handlers, server integration, and access-token helpers. |
| SvelteKit | @sigid/sveltekit |
Hooks and server load integration. |
| SolidStart | @sigid/solidstart |
Routes and server functions. |
| Expo | @sigid/expo |
React Native / Expo storage and redirects. |
| Electron | @sigid/electron |
Electron main/renderer authentication helpers. |
Backend SDKs¶
| Runtime | Directory | Use it for |
|---|---|---|
| Go | sdks/go |
Go services, CLIs, and infrastructure tooling. |
| Rust | sdks/rust |
Rust services and security-sensitive integrations. |
| Elixir | sdks/elixir |
Phoenix, BEAM services, and server-side integrations. |
For languages without an official SDK, use standard OAuth/OIDC libraries and the API reference for the deployment.
Example App Path¶
Use Run The Example App for a runnable walkthrough of
examples/sdk-lab-next. It demonstrates:
- browser setup with
@sigid/client - hosted login with
login() - callback handling with
handleCallback() - logout with
logout() - protected Next.js routes
- server-side token validation
Recommended Order¶
- Start with the quickstart that matches your runtime.
- Use the SDK closest to your app.
- Verify tokens on your backend.
- Protect each API route or resource.
- Add webhooks or agent auth only if the product needs them.
For the full API surface, continue to Reference: API And SDK Reference.