Skip to content

Releases: workos/workos-node

v8.0.0

12 Jan 17:37
6da127b

Choose a tag to compare

What's Changed

  • chore(deps): update jest monorepo by @renovate[bot] in #832
  • Release v8.0.0: Universal Runtime Support & API Modernization by @nicknisi in #1370

Breaking Change

This is a breaking change that drops support for Node 16 and Node 18.

New Features

PKCE Authentication for Public Clients
• API key is now optional - initialize with just clientId for public client apps
• New getAuthorizationUrlWithPKCE() method generates PKCE challenge internally
authenticateWithCode() auto-detects client mode (public vs confidential)
• New createWorkOS() factory with compile-time type safety - TypeScript errors if you use server-only methods on public clients
Use case: Build mobile apps, desktop apps, SPAs with secure WorkOS auth without exposing API keys

Universal Runtime Support
• SDK now works seamlessly across Node.js, Deno, Bun, and Cloudflare Workers
• Runtime-specific exports automatically detected via package.json conditions
• Dual build strategy: ESM unbundled (optimal tree-shaking), CJS inlines ESM-only deps
• No more lib/node_modules/ issues that broke Electron packaging

Better TypeScript Types
• SSO authorization options now use discriminated unions (must specify exactly one of: connection, organization, or provider)
• Public vs confidential client types enforced at compile time
• Improved type inference across the board

🔥 Most Exciting Changes

  1. You can now build mobile/desktop apps with WorkOS - PKCE support means no backend proxy needed for client apps
  2. Deploy to Cloudflare Workers/edge - Full edge runtime support with proper exports
  3. Type-safe public clients - TypeScript catches security mistakes at compile time
  4. Works everywhere - Node, Deno, Bun, Workers all tested and verified

⚠️ Breaking Changes

Minimum Node.js version: 20+ (Node 16 and 18 both have reached EOL)

Removed deprecated methods:
• Vault: createSecret() → use createObject()
• Vault: listSecrets() → use listObjects()
• Vault: readSecret() → use readObject()
• Vault: updateSecret() → use updateObject()
• Vault: deleteSecret() → use deleteObject()
• MFA: verifyFactor() → use verifyChallenge()
• User Management: sendMagicAuthCode() → use sendMagicCode()

API Changes:
listOrganizationMemberships() now requires userId OR organizationId
• Directory Sync: user fields moved to customAttributes (e.g., user.customAttributes?.emails)
• SSO: stricter types - must specify one of connection, organization, or provider (not multiple)
• Organizations: removed allowProfilesOutsideOrganization and domains fields
• Events: dsync.deactivateddsync.deleted

Package structure:
• Now ESM-first with dual CJS/ESM exports
• Removed internal HTTP/crypto provider classes (public API unchanged)

Install: npm install @workos-inc/node@8
Migration Guide: V8_MIGRATION_GUIDE.md

Questions? Hit me up!

Full Changelog: v7.82.0...v8.0.0

v7.82.0

09 Jan 22:15
24b8ea8

Choose a tag to compare

What's Changed

Full Changelog: v7.81.0...v7.82.0

v7.81.0

07 Jan 23:59
730eabd

Choose a tag to compare

What's Changed

Full Changelog: v7.80.0...v7.81.0

v7.80.0

07 Jan 19:05
18f60f5

Choose a tag to compare

What's Changed

Full Changelog: v7.79.3...v7.80.0

v7.79.3

02 Jan 15:33
f7f4896

Choose a tag to compare

What's Changed

Full Changelog: v7.79.2...v7.79.3

v7.79.2

30 Dec 20:06
1948ab1

Choose a tag to compare

What's Changed

Full Changelog: v7.79.1...v7.79.2

v7.79.1

30 Dec 16:41
b27dde1

Choose a tag to compare

What's Changed

Full Changelog: v7.79.0...v7.79.1

v7.79.0

30 Dec 15:42
bd6e2d9

Choose a tag to compare

What's Changed

Full Changelog: v7.78.0...v7.79.0

v7.78.0

24 Dec 19:36
0e60589

Choose a tag to compare

What's Changed

Full Changelog: v7.77.0...v7.78.0

v7.77.0

04 Dec 17:34
da9f834

Choose a tag to compare

What's Changed

Full Changelog: v7.76.0...v7.77.0