{"id":31107874,"url":"https://github.com/scalekit-inc/scalekit-sdk-node","last_synced_at":"2026-02-10T22:06:08.725Z","repository":{"id":232511099,"uuid":"776737273","full_name":"scalekit-inc/scalekit-sdk-node","owner":"scalekit-inc","description":"Node.js SDK for enterprise authentication - integrate SAML and OIDC Single Sign-On in hours","archived":false,"fork":false,"pushed_at":"2026-01-24T04:13:02.000Z","size":1529,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-25T01:53:45.168Z","etag":null,"topics":["authentication","client-library","enterprise-auth","javascript","nodejs","oidc","saml","sdk","sso","typescript"],"latest_commit_sha":null,"homepage":"https://docs.scalekit.com/sso/quickstart?tech-stack=nodejs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scalekit-inc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-24T10:54:30.000Z","updated_at":"2026-01-24T04:13:06.000Z","dependencies_parsed_at":"2025-12-15T20:03:57.782Z","dependency_job_id":null,"html_url":"https://github.com/scalekit-inc/scalekit-sdk-node","commit_stats":null,"previous_names":["scalekit-inc/scalekit-node","scalekit-inc/scalekit-sdk-node"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/scalekit-inc/scalekit-sdk-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalekit-inc%2Fscalekit-sdk-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalekit-inc%2Fscalekit-sdk-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalekit-inc%2Fscalekit-sdk-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalekit-inc%2Fscalekit-sdk-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scalekit-inc","download_url":"https://codeload.github.com/scalekit-inc/scalekit-sdk-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalekit-inc%2Fscalekit-sdk-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29319338,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","client-library","enterprise-auth","javascript","nodejs","oidc","saml","sdk","sso","typescript"],"created_at":"2025-09-17T05:59:51.825Z","updated_at":"2026-02-10T22:06:08.717Z","avatar_url":"https://github.com/scalekit-inc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"left\"\u003e\n  \u003ca href=\"https://scalekit.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003cimg src=\"https://cdn.scalekit.cloud/v1/scalekit-logo-dark.svg\" height=\"64\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n  \u003cbr/\u003e\n\u003c/p\u003e\n\n# Official Node.js SDK\n\n[![npm version](https://img.shields.io/npm/v/@scalekit-sdk/node.svg?style=flat-square)](https://www.npmjs.com/package/@scalekit-sdk/node)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![npm downloads](https://img.shields.io/npm/dm/@scalekit-sdk/node.svg?style=flat-square)](https://www.npmjs.com/package/@scalekit-sdk/node)\n\n\u003ca href=\"https://scalekit.com\" target=\"_blank\" rel=\"noopener noreferrer\"\u003eScalekit\u003c/a\u003e is the **auth stack for AI apps** - from human authentication to agent authorization. Build secure AI products faster with authentication for humans (SSO, passwordless, full-stack auth) and agents (MCP/APIs, delegated actions), all unified on one platform. This Node.js SDK enables both traditional B2B authentication and cutting-edge agentic workflows.\n\n## 🤖 Agent-First Features\n\n- **🔐 Agent Identity**: Agents as first-class actors with human ownership and org context\n- **🎯 MCP-Native OAuth 2.1**: Purpose-built for Model Context Protocol with DCR/PKCE support\n- **⏰ Ephemeral Credentials**: Time-bound, task-based authorization (minutes, not days)\n- **🔒 Token Vault**: Per-user, per-tool token storage with rotation and progressive consent\n- **👥 Human-in-the-Loop**: Step-up authentication when risk crosses thresholds\n- **📊 Immutable Audit**: Track which user initiated, which agent acted, what resource was accessed\n\n## 👨‍💼 Human Authentication\n\n- **🔐 Enterprise SSO**: Support for SAML and OIDC protocols\n- **👥 SCIM Provisioning**: Automated user provisioning and deprovisioning  \n- **🚀 Passwordless Authentication**: Magic links, OTP, and modern auth flows\n- **🏢 Multi-tenant Architecture**: Organization-level authentication policies\n- **📱 Social Logins**: Support for popular social identity providers\n- **🛡️ Full-Stack Auth**: Complete IdP-of-record solution for B2B SaaS\n- **🔷 TypeScript Support**: Full TypeScript definitions included\n\n\u003cdiv\u003e\n📚 \u003ca target=\"_blank\" href=\"https://docs.scalekit.com\"\u003eDocumentation\u003c/a\u003e • 🚀 \u003ca target=\"_blank\" href=\"https://docs.scalekit.com/sso/quickstart/\"\u003eSSO Quickstart\u003c/a\u003e • 💻 \u003ca target=\"_blank\" href=\"https://docs.scalekit.com/apis\"\u003eAPI Reference\u003c/a\u003e\n\u003c/div\u003e\n\u003chr /\u003e\n\n## Pre-requisites\n\n1. [Sign up](https://scalekit.com) for a Scalekit account.\n2. Get your `env_url`, `client_id` and `client_secret` from the Scalekit dashboard.\n\n\u003cdiv style=\"border: 1px solid #ccc; padding: 10px; border-radius: 5px; background-color: #f9f9f9;\"\u003e\n  \u003cstrong\u003eNote:\u003c/strong\u003e Our Node.js SDK requires Node.js 18.14.1 or later .\n\u003c/div\u003e\n\n## Installation\n\nInstall Scalekit SDK using your preferred package manager.\n\n```sh\nnpm install @scalekit-sdk/node\n#or\nyarn add @scalekit-sdk/node\n#or\npnpm add @scalekit-sdk/node\n```\n\n#### Minimum Requirements\n\nThe Scalekit Node.js SDK has been tested with and requires the following:\n\n| Component | Version   |\n| --------- | --------- |\n| Node.js   | 18.14.1+  |\n\n\u003e **Note:** Node.js 18.14.1 or later is required (see `engines.node` in package.json). We recommend using the current LTS release for best support.\n\n\n## Usage\n\nInitialize the Scalekit client using the appropriate credentials. Refer code sample below.\n\n```javascript\nimport { ScalekitClient } from \"@scalekit-sdk/node\";\n\nconst scalekitClient = new ScalekitClient(\n  process.env.SCALEKIT_ENV_URL!,\n  process.env.SCALEKIT_CLIENT_ID!,\n  process.env.SCALEKIT_CLIENT_SECRET!\n);\n\n// Use the sc object to interact with the Scalekit API\nconst authUrl = scalekitClient.getAuthorizationUrl(\"https://acme-corp.com/redirect-uri\", {\n  state: \"state\",\n  connectionId: \"connection_id\",\n});\n\n```\n\n## Examples - SSO with Express.js\n\nBelow is a simple code sample that showcases how to implement Single Sign-on using Scalekit SDK\n\n```javascript\nimport express from \"express\";\nimport { ScalekitClient } from \"@scalekit-sdk/node\";\n\nconst app = express();\n\nconst sc = new ScalekitClient(\n  process.env.SCALEKIT_ENV_URL!,\n  process.env.SCALEKIT_CLIENT_ID!,\n  process.env.SCALEKIT_CLIENT_SECRET!\n);\n\nconst redirectUri = `${process.env.HOST}/auth/callback`;\n\n// Get the authorization URL and redirect the user to the IdP login page\napp.get(\"/auth/login\", (req, res) =\u003e {\n  const authUrl = scalekitClient.getAuthorizationUrl(\n    redirectUri,\n    {\n      state: \"state\",\n      connectionId: \"connection_id\",\n    }\n  );\n\n  res.redirect(authUrl);\n});\n\n// Handle the callback from Scalekit\napp.get(\"/auth/callback\", async (req, res) =\u003e {\n  const { code, error, error_description, idp_initiated_login } = req.query;\n  // Handle error\n  if (error) {\n    return res.status(400).json({ error, error_description });\n  }\n  // Handle IdP initiated login\n  if (idp_initiated_login) {\n    // Get the claims from the IdP initiated login\n    const {\n      connection_id,\n      organization_id,\n      login_hint,\n      relay_state\n    } = await scalekitClient.getIdpInitiatedLoginClaims(idp_initiated_login as string);\n    // Get the authorization URL and redirect the user to the IdP login page\n    const url = scalekitClient.getAuthorizationUrl(\n      redirectUri,\n      {\n        connectionId: connection_id,\n        organizationId: organization_id,\n        loginHint: login_hint,\n        ...(relay_state \u0026\u0026 { state: relay_state }),\n      }\n    )\n\n   return res.redirect(url);\n  }\n  const authResp = await scalekitClient.authenticateWithCode(code, redirectUri);\n  res.cookie(\"access_token\", authResp.accessToken);\n  return res.json(authResp.accessToken);\n});\n\napp.listen(3000, () =\u003e {\n  console.log(\"Server is running on port 3000\");\n});\n```\n\n## 📱 Example Apps\n\nExplore fully functional sample applications built with popular Node.js frameworks and the Scalekit SDK:\n\n| Framework | Repository | Description |\n|-----------|------------|-------------|\n| **Express.js** | [scalekit-express-example](https://github.com/scalekit-developers/scalekit-express-example) | Basic Express.js server implementation |\n| **Next.js** | [scalekit-nextjs-demo](https://github.com/scalekit-developers/scalekit-nextjs-demo) | Modern React/Next.js application |\n\n## 🔗 Helpful Links\n\n### 📖 Quickstart Guides\n- [**SSO Integration**](https://docs.scalekit.com/sso/quickstart/) - Implement enterprise Single Sign-on\n- [**Full Stack Auth**](https://docs.scalekit.com/fsa/quickstart/) - Complete authentication solution\n- [**Passwordless Auth**](https://docs.scalekit.com/passwordless/quickstart/) - Modern authentication flows\n- [**Social Logins**](https://docs.scalekit.com/social-logins/quickstart/) - Popular social identity providers\n- [**Machine-to-Machine**](https://docs.scalekit.com/m2m/quickstart/) - API authentication\n\n### 📚 Documentation \u0026 Reference\n- [**API Reference**](https://docs.scalekit.com/apis) - Complete API documentation\n- [**Developer Kit**](https://docs.scalekit.com/dev-kit/) - Tools and utilities\n- [**API Authentication Guide**](https://docs.scalekit.com/guides/authenticate-scalekit-api/) - Secure API access\n\n### 🛠️ Additional Resources\n- [**Setup Guide**](https://docs.scalekit.com/guides/setup-scalekit/) - Initial platform configuration\n- [**Code Examples**](https://docs.scalekit.com/directory/code-examples/) - Ready-to-use code snippets\n- [**Admin Portal Guide**](https://docs.scalekit.com/directory/guides/admin-portal/) - Administrative interface\n- [**Launch Checklist**](https://docs.scalekit.com/directory/guides/launch-checklist/) - Pre-production checklist\n\n## License\n\nThis project is licensed under the **MIT license**.\nSee the [LICENSE](LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalekit-inc%2Fscalekit-sdk-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscalekit-inc%2Fscalekit-sdk-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalekit-inc%2Fscalekit-sdk-node/lists"}