Start here
Move from WorkOS
Switching is an import and a key: @orbitid/node has the same methods as the WorkOS Node SDK. Organizations you haven't moved yet keep signing in through WorkOS until you move each one.
With your coding agent
Claude Code, Cursor or Codex makes the change in your repo and tells you what it touched.
Move this app from WorkOS to OrbitID. Follow https://orbitid.com/docs/migrate/workos.md 1. Replace @workos-inc/node with @orbitid/node. Same method names. 2. Read the key from ORBITID_API_KEY. Keep WORKOS_CLIENT_ID as is. 3. Keep every organization ID, redirect URI and callback route. 4. Verify webhooks with webhooks.constructEvent and ORBITID_WEBHOOK_SECRET. 5. Leave MFA, AuthKit and User Management calls alone and list them for me. 6. Run the tests, then show me every call site you changed.
Import your organizations
In the dashboard, open Organizations and click Import, or Import next to Coming from WorkOS? on Home. Paste a WorkOS API key, your client ID and the sign-in callback URL your app already gives WorkOS, then pick the organizations to bring over. Use your WorkOS staging key in Testing to try the whole move for free, and your production key in Production.
OrbitID copies each organization's name and domains, which identity provider it uses, and its directory users and groups as a starting snapshot. External IDs and metadata aren't copied, so if your app reads them, keep them on your side before you swap the client. The WorkOS key is stored encrypted, used read-only, and deleted when you disconnect.
Importing is free. An imported organization isn't billed while its sign-ins still go through WorkOS; it's billed once people sign in through OrbitID. See Billing.
WorkOS never shares IdP metadata, certificates or SCIM tokens, so each customer's IT admin adds those again when they move. Your app doesn't wait for that.
Install the SDK
npm install @orbitid/node
Create an API key in the environment you imported into and set it as ORBITID_API_KEY. Production keys start with orb_live_, Testing keys with orb_test_.
Swap the client
Replace the WorkOS client with the OrbitID one. Keeping the variable name means nothing else in your code changes:
import { OrbitID } from '@orbitid/node'const workos = new OrbitID(process.env.ORBITID_API_KEY)
The client reads your client ID from ORBITID_CLIENT_ID, then WORKOS_CLIENT_ID, so the variable you already set keeps working. Organization IDs, redirect URIs and your callback route stay exactly as they are:
const url = workos.sso.getAuthorizationUrl({organization: 'org_01HZ4K…',redirectUri: 'https://yourapp.com/auth/callback',state})const { profile } = await workos.sso.getProfileAndToken({ code })
Deploy once. From then on every sign-in goes through OrbitID: an organization that has moved signs in with OrbitID, and one that hasn't is forwarded to WorkOS with your client ID. Your app gets the same profile either way. The import page ticks off your app's first API call and its first forwarded sign-in.
Verify webhooks
Add your webhook endpoint under Developers → Webhooks and keep the WorkOS one until every directory has moved. webhooks.constructEvent accepts both the OrbitID-Signature and WorkOS-Signature headers, so pass both secrets:
const event = await workos.webhooks.constructEvent({payload: rawBody,sigHeader:request.headers.get('orbitid-signature') ??request.headers.get('workos-signature') ??'',secret: [process.env.ORBITID_WEBHOOK_SECRET!,process.env.WORKOS_WEBHOOK_SECRET!]})
Use the raw request body, not a re-serialised version of it.
Move each customer
Open the organization in the dashboard and send its IT admin a setup link. They add a new app in their identity provider from our guide, with the same groups, and test a sign-in while the WorkOS app keeps working. When the test passes you switch the organization to OrbitID, and they delete the old app. Billing for that connection starts once people sign in through OrbitID.
For Directory Sync, the admin swaps the SCIM URL and token on their existing provisioning app. Users and groups were copied when you imported, so nobody is provisioned again.
Finish the move
Disconnect unlocks on the import page once every organization has switched to OrbitID, every live directory has synced through OrbitID since its SCIM URL and token changed, and nothing has been forwarded to WorkOS for 7 days. Disconnect, then cancel WorkOS.
What's covered
| Area | Methods |
|---|---|
sso | getAuthorizationUrl, getProfileAndToken, getProfile, listConnections, getConnection |
organizations | listOrganizations, getOrganization, createOrganization, updateOrganization, deleteOrganization |
directorySync | listDirectories, getDirectory, listUsers, getUser, listGroups, getGroup |
portal | generateLink for sso and dsync |
webhooks | constructEvent, verifyHeader |
Lists return { data, listMetadata, autoPagination() }, and errors throw OrbitIDError with status, code and message.
MFA, AuthKit and User Management are WorkOS products OrbitID doesn't offer. Leave those calls on @workos-inc/node.

