{"id":13727324,"url":"https://github.com/workos/workos-node","last_synced_at":"2026-04-25T01:09:39.118Z","repository":{"id":37056017,"uuid":"191794169","full_name":"workos/workos-node","owner":"workos","description":"Official Node SDK for interacting with the WorkOS API","archived":false,"fork":false,"pushed_at":"2026-01-28T11:12:47.000Z","size":13883,"stargazers_count":196,"open_issues_count":42,"forks_count":44,"subscribers_count":17,"default_branch":"main","last_synced_at":"2026-01-29T02:23:38.304Z","etag":null,"topics":["adfs","audit-logs","azure-active-directory","directory-sync","gsuite-saml-apps","node-sdk","okta","saml","scim","sso","sso-solution"],"latest_commit_sha":null,"homepage":"https://workos.com/docs/sdk/node","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/workos.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":".github/CODEOWNERS","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":"2019-06-13T16:03:28.000Z","updated_at":"2026-01-26T06:02:32.000Z","dependencies_parsed_at":"2025-12-31T01:02:47.953Z","dependency_job_id":null,"html_url":"https://github.com/workos/workos-node","commit_stats":null,"previous_names":["workos-inc/workos-node","workos-inc/workos-js"],"tags_count":239,"template":false,"template_full_name":null,"purl":"pkg:github/workos/workos-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fworkos-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fworkos-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fworkos-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fworkos-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workos","download_url":"https://codeload.github.com/workos/workos-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workos%2Fworkos-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29062498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T23:14:54.203Z","status":"ssl_error","status_checked_at":"2026-02-03T23:14:50.873Z","response_time":96,"last_error":"SSL_read: 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":["adfs","audit-logs","azure-active-directory","directory-sync","gsuite-saml-apps","node-sdk","okta","saml","scim","sso","sso-solution"],"created_at":"2024-08-03T01:03:49.791Z","updated_at":"2026-04-25T01:09:39.104Z","avatar_url":"https://github.com/workos.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# WorkOS Node.js Library\n\n![npm](https://img.shields.io/npm/v/@workos-inc/node)\n[![Build Status](https://github.com/workos/workos-node/actions/workflows/ci.yml/badge.svg)](https://github.com/workos/workos-node/actions/workflows/ci.yml)\n\nThe WorkOS library for Node.js provides convenient access to the WorkOS API from applications written in server-side JavaScript.\n\n## Documentation\n\nSee the [API Reference](https://workos.com/docs/reference/client-libraries) for Node.js usage examples.\n\n## Requirements\n\nNode 22.11 or higher.\n\n## Installation\n\nInstall the package with:\n\n```\nnpm install @workos-inc/node\n```\n\n## Configuration\n\nTo use the library you must provide an API key, located in the WorkOS dashboard, as an environment variable `WORKOS_API_KEY`:\n\n```sh\nWORKOS_API_KEY=\"sk_1234\"\n```\n\nOr, you can set it on your own before your application starts:\n\n```ts\nimport { WorkOS } from '@workos-inc/node';\n\nconst workos = new WorkOS('sk_1234');\n```\n\n## Public Client Mode (Browser/Mobile/CLI)\n\nFor apps that can't securely store secrets, initialize with just a client ID:\n\n```ts\nimport { WorkOS } from '@workos-inc/node';\n\nconst workos = new WorkOS({ clientId: 'client_...' }); // No API key needed\n\n// Generate auth URL with automatic PKCE\nconst { url, codeVerifier } =\n  await workos.userManagement.getAuthorizationUrlWithPKCE({\n    provider: 'authkit',\n    redirectUri: 'myapp://callback',\n    clientId: 'client_...',\n  });\n\n// After user authenticates, exchange code for tokens\nconst { accessToken, refreshToken } =\n  await workos.userManagement.authenticateWithCode({\n    code: authorizationCode,\n    codeVerifier,\n    clientId: 'client_...',\n  });\n```\n\n\u003e [!IMPORTANT]\n\u003e Store `codeVerifier` securely on-device between generating the auth URL and handling the callback. For mobile apps, use platform secure storage (iOS Keychain, Android Keystore). For CLI apps, consider OS credential storage. The verifier must survive app restarts during the auth flow.\n\nSee the [AuthKit documentation](https://workos.com/docs/authkit) for details on PKCE authentication.\n\n### PKCE with Confidential Clients\n\nServer-side apps can also use PKCE alongside the client secret for defense in depth (recommended by OAuth 2.1):\n\n```ts\nconst workos = new WorkOS('sk_...'); // With API key\n\n// Use PKCE even with API key for additional security\nconst { url, codeVerifier } =\n  await workos.userManagement.getAuthorizationUrlWithPKCE({\n    provider: 'authkit',\n    redirectUri: 'https://example.com/callback',\n    clientId: 'client_...',\n  });\n\n// Both client_secret AND code_verifier will be sent\nconst { accessToken } = await workos.userManagement.authenticateWithCode({\n  code: authorizationCode,\n  codeVerifier,\n  clientId: 'client_...',\n});\n```\n\n## SDK Versioning\n\nFor our SDKs WorkOS follows a Semantic Versioning ([SemVer](https://semver.org/)) process where all releases will have a version X.Y.Z (like 1.0.0) pattern wherein Z would be a bug fix (e.g., 1.0.1), Y would be a minor release (1.1.0) and X would be a major release (2.0.0). We permit any breaking changes to only be released in major versions and strongly recommend reading changelogs before making any major version upgrades.\n\n## Beta Releases\n\nWorkOS has features in Beta that can be accessed via Beta releases. We would love for you to try these\nand share feedback with us before these features reach general availability (GA). To install a Beta version,\nplease follow the [installation steps](#installation) above using the Beta release version.\n\n\u003e Note: there can be breaking changes between Beta versions. Therefore, we recommend pinning the package version to a\n\u003e specific version. This way you can install the same version each time without breaking changes unless you are\n\u003e intentionally looking for the latest Beta version.\n\nWe highly recommend keeping an eye on when the Beta feature you are interested in goes from Beta to stable so that you\ncan move to using the stable version.\n\n## More Information\n\n- [Single Sign-On Guide](https://workos.com/docs/sso/guide)\n- [Directory Sync Guide](https://workos.com/docs/directory-sync/guide)\n- [Admin Portal Guide](https://workos.com/docs/admin-portal/guide)\n- [Magic Link Guide](https://workos.com/docs/magic-link/guide)\n- [Domain Verification Guide](https://workos.com/docs/domain-verification/guide)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkos%2Fworkos-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkos%2Fworkos-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkos%2Fworkos-node/lists"}