Skip to main content

Migrating from WorkOS to Gate

WorkOS's positioning is enterprise-SSO-first — SAML / OIDC federation with downstream B2B customers' IdPs (Directory Sync via SCIM, Magic Link, AuditLogs as a separate product family). Gate covers the same enterprise-federation surface as a first-class platform primitive without splitting capabilities across separate product SKUs.

If you haven't already, read the migration overview for the four-phase migration arc that applies across all vendors.

1. Capability mapping​

CapabilityWorkOSGate
SSO (SAML / OIDC-via-SAML)SSO product — SAML and OIDC federation with customer IdPsgate.signInWithProvider({ provider: 'saml' }); same federation surface, no separate SKU
Directory SyncSeparate product — SCIM 2.0 ingestion<orgSlug>.api.k9o.io/@<projectSlug>/scim/v2/{Users,Groups} SCIM endpoint
Magic LinkMagic Link product — passwordless emailgate.passwordless.requestMagicLink → gate.passwordless.verifyMagicLink
AuthKitWorkOS-hosted sign-in UI (<authkit-button>, redirect flow)Gate Studio — visual sign-in authoring with parity feature surface
Audit LogsSeparate product — append-only audit ledgerNative audit-ledger family in every project; see Audit Log
Admin PortalWorkOS-hosted admin onboarding for customer IdP adminsConsole admin surfaces under /admin/auth/providers
User ManagementWorkOS User Management (B2C/B2B users)Gate users + project membership + RBAC roles
MFATOTP / SMS via User ManagementEnd-user TOTP enrollment (POST /@<projectSlug>/gate/mfa/totp/enroll, .../totp/confirm); WebAuthn: see API → Auth §6 (SMS not supported per NIST 800-63B-4)
PasskeysPasskeys via User ManagementSee API → Auth §6
WebhooksPer-product webhooksWebhook subscriptions per Security §2.6
PricingPer-product SKU with per-connection / per-MAU pricing50K MAU on Free; Unlimited on every paid tier; no per-product SKU split

The structural shift: WorkOS sells SSO, Directory Sync, Magic Link, Audit Logs, and User Management as separate products with separate SDK clients (@workos-inc/node with per-product methods like workos.sso.* / workos.directorySync.*). Gate consolidates these into a single SDK with the same gate.* namespace; SSO + Directory Sync + Magic Link + Audit + User Management are all platform primitives, not SKU upsells.

WorkOS, separate SKUsGate, one clientSSOSAML and OIDC federationgate.signInWithProviderprovider: 'saml'Directory SyncSCIM 2.0 ingestionSCIM endpointscim/v2 Users and GroupsMagic Linkpasswordless emailgate.passwordlessrequestMagicLink, verifyMagicLinkAudit Logsappend-only audit ledgerAudit ledgernative to every projectUser ManagementB2C and B2B usersGate users, RBAC rolesplus project membership
Five separately sold WorkOS families consolidate onto one Gate client with a single gate.* namespace.

2. API-shape mapping​

2.1 SSO sign-in​

// Before — WorkOS
import { WorkOS } from '@workos-inc/node';
const workos = new WorkOS(apiKey);
const url = workos.sso.getAuthorizationUrl({
connection: 'conn_xxx',
clientId: 'client_xxx',
redirectUri: 'https://app.example.com/callback',
});
// On callback:
const { user } = await workos.sso.getProfileAndToken({ code, clientId });

// After — Gate
import { createGateClient } from '@k9o/gate';
const gate = createGateClient({ mode: 'standalone', baseUrl: '...', projectSlug: '...' });
// Redirect the browser to the IdP:
await gate.signInWithProvider({
provider: 'saml',
redirectUri: 'https://app.example.com/callback',
});
// On the callback page, exchange the returned code for the session:
const result = await gate.completeSignIn();
if (result.ok) {
const { accessToken, refreshToken, expiresAt } = result;
}

The redirect URL and the callback handler shape map cleanly. WorkOS's per-connection federation is selected on Gate by the provider value ('saml' for enterprise federation); the IdP itself is configured once for the project rather than per sign-in call.

2.2 Directory Sync (SCIM)​

WorkOS exposes Directory Sync's SCIM events through their webhook + SDK pattern:

// Before — WorkOS
const events = await workos.events.listEvents({
events: ['dsync.user.created', 'dsync.user.updated', 'dsync.user.deleted'],
});

// After — Gate (client = createClient({ orgSlug, projectSlug, apiKey }))
const events = await client.audit.query({
eventType: 'user.', // prefix match on the stored event type
limit: 100,
});

Configure the upstream IdP (Entra / Google Workspace / Okta) to provision into Gate's SCIM endpoint at <orgSlug>.api.k9o.io/@<projectSlug>/scim/v2/Users; the same identity-flow events surface in Gate's audit ledger.

// Before — WorkOS
const result = await workos.passwordless.createSession({
email,
type: 'MagicLink',
redirectUri,
});
await workos.passwordless.sendSession(result.id);
// On callback:
const session = await workos.passwordless.authenticateSession({ code });

// After — Gate
await gate.passwordless.requestMagicLink({ email, redirectUrl });
// On callback, redeem the token:
const { data } = await gate.passwordless.verifyMagicLink({ token });
const accessToken = data.session.accessToken;

Two API calls collapsed into one on the dispatch side; the callback handler stays one-call.

3. User-data migration​

WorkOS doesn't store passwords for SSO-federated users (the upstream IdP is the source of truth). For User Management deployments, export users via:

const users = await workos.userManagement.listUsers({ limit: 100 });

Field mapping:

WorkOS fieldGate field
id (user_xxx)New Gate user ID; preserve old in customAttributes.workos_id
emailemail
firstName + lastNamecustomAttributes.firstName + lastName
emailVerifiedemailVerified
profilePictureUrlcustomAttributes.profilePictureUrl
createdAt / updatedAtPreserved on import
Identity provider links (SSO)Re-link via the project's Console IdP configuration after import; SSO users re-federate on first sign-in
Group memberships (Directory Sync)SCIM sync re-establishes after IdP is reconfigured at Gate's SCIM endpoint

For password-based User Management users, WorkOS exposes hashed-password export via support request; Gate accepts bcrypt / scrypt / argon2 hashes via gate.users.import with hasher metadata.

4. Cutover checklist​

StepDone when
Capability auditEvery WorkOS product family (SSO + Directory Sync + Magic Link + AuditLogs + User Management) mapped to Gate primitives
Per-product SDK consolidationPer-product WorkOS SDK calls consolidated to single Gate client with method discriminator
Parallel-runGate provisioned alongside WorkOS; new SSO connections configured on both; one IdP at a time piloted
User-data exportWorkOS users + connections + directories exported
User-data importgate.users.import against target Gate project; per-IdP federation configured in the Console
SCIM endpoint reconfigurationUpstream IdPs (Entra / Google Workspace / Okta etc.) re-pointed at Gate's SCIM endpoint
Customer IdP-admin onboarding flowIf you use WorkOS Admin Portal, replace with self-service onboarding via Console or Gate Studio
AuditKit replacementResource servers consuming WorkOS audit events re-pointed at Gate audit ledger or SIEM forwarding
CutoverSign-ins routed Gate-only; WorkOS connections deactivated per-tenant on a phased schedule
DecommissionWorkOS subscription cancelled after a 60-day verification window

5. See also​