Node.js SDK

WorkOS SDK libraries for your favorite platforms.

v2.12.0

  • Added support for passing idempotency keys to createOrganization (#655)
  • Added support for customizing Axios client (#657)

v2.9.1

  • Exported audit log interfaces (#643)

v2.9.0

  • Added organization_id to Directory User and Directory Group (#640)

v2.8.1

  • Fixed misleading 404 messages (#638)

v2.8.0

  • Added auditLogs modules (preview) (#636)
  • Updated endpoints used for MFA operations (#633)

2.7.0

  • Added order param for pagination by (#614)
  • Added idp_id, created_at and updated_at fields to Directory Group interface (#622)
  • Made expires_at nullable in MFA challenge interface (#623)
  • Updated connection enum list and bumped version to 2.7.0 (#624)

v2.6.1

  • Propagated code and message error properties for 422 responses
  • Fixed TS types for verifyFactor response

v2.6.0

  • Updated types for Directory, User, and Group entities in webhook payloads (#611)
  • Updated various dependencies
  • Removed environment_id parameter from objects as this field is not returned by the API (#612)

v2.5.1

  • Fixed MFA API argument casing (#586)

v2.5.0

  • MFA API support (#572)
  • Exported organization type definitions (#562)
  • Added organization_id parameter to listDirectories method (#576)
  • Numerous dependency version updated

v2.4.0

  • Added support for passing a domain_hint and login_hint to sso.getAuthorizationURL (#540)

v2.3.0

  • Added support for passing an organization to sso.getAuthorizationURL (#537)
  • Increased the default tolerance for webhooks.constructEvent to three minutes (#530)
  • Deprecated the domain parameter for sso.getAuthorizationURL in favor of organization (#537)

v2.2.0

  • Exposed directory_id field on Users and Groups (#514)

v2.1.1

  • Webhook Validation: Added line to stringify payload to resolve error (#517)

v2.1.0

  • Added 'inactive' to user state (#510)
  • Added Get a Directory endpoint (#511)

v2.0.0

  • The organization_id field on the following objects was made nullable (#504):
    • Connection
    • Directory
    • Profile
  • The listMetadata field on the List type was renamed to list_metadata (#508)
  • Added types for webhook events (#506)

v1.6.0

  • Added Auth0SAML to ConnectionType (#501)
  • Exported exceptions (#503)

v1.5.0

  • Webhook signature validation added (#473)

v1.4.0

  • Added support for allow_profiles_outside_organization to organizations (#468)
  • Exported ProfileAndToken type (#469)
  • Added organization_id to profiles (#470)

v1.3.1

  • Updated dependencies, including an update of axios to 0.21.4

v1.3.0

  • Exposed custom_attributes for directory users (#431)
  • Added created_at and updated_at fields (#437)

v1.2.0

  • Added improved error handling (#410)
  • Added named export for CommonJS consumers (#423)
  • Added OrganizationId to Directory Endpoint (#408)

v1.1.0

  • Added sso.getProfile (#396)
  • Added organizations.getOrganization (#394)
  • Added organizations.deleteOrganization (#398)
  • Added expiresIn to CreatePasswordlessSessionOptions (#405)

v1.0.0

  • sso.getProfile has been renamed to sso.getProfileAndToken (#385)
    • The return type has also been changed from Promise<Profile> to Promise<ProfileAndToken>
  • Organization operations have been moved from the portal namespace to organizations (#390)
    • portal.createOrganizationorganizations.createOrganization
    • portal.listOrganizationsorganizations.listOrganizations
  • sso.createConnection and sso.promoteDraftConnection have been removed (#392)
  • The following fields have been removed from Connections (#379):
    • oauth_uid
    • oauth_secret
    • oauth_redirect_uri
    • saml_entity_id
    • saml_idp_url
    • saml_relying_party_trust_cert
    • saml_x509_certs
  • Added organizations.updateOrganization (#388)
  • Exposed organization_id on Connections (#379)
  • The deprecated projectID parameter for sso.getAuthorizationURL and sso.getProfileAndToken (formerly sso.getProfile) has been fully removed. The clientID parameter should be used instead (#389)

v0.10.3

  • Updated exceptions to extend Error (#381)

v0.10.2

  • Added Connection state replacing status (#376)

v0.10.1

  • Expose idp_id for directory users (#367)

v0.10.0

  • Fixed return type signature for portal.generateLink (#364)

v0.9.10

  • Export UsersWithGroups from package root (#361)

v0.9.9

  • Added directorySync.deleteDirectory for deleting directories (#359)