The JavaScript SDK is a set of TypeScript packages. @scute/js-core is the client every other package builds on; the others add React state, Next.js cookies and route handlers, and ready-made sign-in UI.
Packages#
| Package | Version | Use it for |
|---|---|---|
| @scute/js-core | 0.10.0-next.5 | The client for browsers and Node: every sign-in method, MFA, sessions, the signed-in user, permission checks, the verifications inbox, and ScuteAdminApi for server calls with the app's secret key. |
| @scute/react-hooks | 0.9.0-next.5 | AuthContextProvider, useAuth, MFA hooks, useCan, usePermissions, useImpersonation. Re-exports everything in @scute/js-core. |
| @scute/nextjs-handlers | 0.9.0-next.6 | Next.js 13 to 16, App and Pages Router, Node and Edge: one catch-all route handler, an httpOnly refresh cookie, CSRF checks, and clients for server components, route handlers, server actions and middleware. Re-exports everything in @scute/js-core. |
| @scute/auth-ui-react | 0.4.0-next.5 | <ScuteSignIn />, <ScuteAuthGate />, the headless useScuteAuthFlow, account hooks (profile, sessions, phones, MFA setup) and hooks for embeddable authorization admin screens. |
| create-scute-app | 0.3.0-next.0 | A CLI that adds Scute sign-in to an existing project. |
Agent guardrails (@scute/harness) and the MCP gateway (@scute/mcp-gateway) have their own sections: Harness and AI agents.
Install#
The current releases are published under the next dist-tag. The latest tag points to an older release (0.8.0) that lacks most of what these pages describe, so install with @next.
npm install @scute/js-core@nextPick the packages by where your code runs:
| Your app | Install |
|---|---|
| Next.js | @scute/nextjs-handlers@next @scute/react-hooks@next @scute/auth-ui-react@next |
| React (Vite, Remix, TanStack Start, Astro islands) | @scute/react-hooks@next @scute/auth-ui-react@next |
| React Native, Vue, Svelte, plain browser JavaScript | @scute/js-core@next (React Native: @scute/react-hooks@next) |
| Node server (Express, Fastify, node:http) | @scute/js-core@next |
React 16.8 to 19 works with @scute/react-hooks. @scute/auth-ui-react needs React 18 or later.
Credentials#
| Value | Where it goes | Notes |
|---|---|---|
| App ID | appId in the client config, or NEXT_PUBLIC_SCUTE_APP_ID for @scute/nextjs-handlers | Public. On the app's page in the dashboard. |
| Secret key | secretKey in the config, or SCUTE_SECRET for @scute/nextjs-handlers | Server only. A client running in a browser ignores it, logs a warning and never sends it. |
| Base URL | baseUrl, or NEXT_PUBLIC_SCUTE_BASE_URL | Default https://api.scute.io. |