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
| Capability | WorkOS | Gate |
|---|---|---|
| SSO (SAML / OIDC-via-SAML) | SSO product — SAML and OIDC federation with customer IdPs | gate.signInWithProvider({ provider: 'saml' }); same federation surface, no separate SKU |
| Directory Sync | Separate product — SCIM 2.0 ingestion | <orgSlug>.api.k9o.io/@<projectSlug>/scim/v2/{Users,Groups} SCIM endpoint |
| Magic Link | Magic Link product — passwordless email | gate.passwordless.requestMagicLink → gate.passwordless.verifyMagicLink |
| AuthKit | WorkOS-hosted sign-in UI (<authkit-button>, redirect flow) | Gate Studio — visual sign-in authoring with parity feature surface |
| Audit Logs | Separate product — append-only audit ledger | Native audit-ledger family in every project; see Audit Log |
| Admin Portal | WorkOS-hosted admin onboarding for customer IdP admins | Console admin surfaces under /admin/auth/providers |
| User Management | WorkOS User Management (B2C/B2B users) | Gate users + project membership + RBAC roles |
| MFA | TOTP / SMS via User Management | End-user TOTP enrollment (POST /@<projectSlug>/gate/mfa/totp/enroll, .../totp/confirm); WebAuthn: see API → Auth §6 (SMS not supported per NIST 800-63B-4) |
| Passkeys | Passkeys via User Management | See API → Auth §6 |
| Webhooks | Per-product webhooks | Webhook subscriptions per Security §2.6 |
| Pricing | Per-product SKU with per-connection / per-MAU pricing | 50K 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.
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.
2.3 Magic link
// 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 field | Gate field |
|---|---|
id (user_xxx) | New Gate user ID; preserve old in customAttributes.workos_id |
email | email |
firstName + lastName | customAttributes.firstName + lastName |
emailVerified | emailVerified |
profilePictureUrl | customAttributes.profilePictureUrl |
createdAt / updatedAt | Preserved 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
| Step | Done when |
|---|---|
| Capability audit | Every WorkOS product family (SSO + Directory Sync + Magic Link + AuditLogs + User Management) mapped to Gate primitives |
| Per-product SDK consolidation | Per-product WorkOS SDK calls consolidated to single Gate client with method discriminator |
| Parallel-run | Gate provisioned alongside WorkOS; new SSO connections configured on both; one IdP at a time piloted |
| User-data export | WorkOS users + connections + directories exported |
| User-data import | gate.users.import against target Gate project; per-IdP federation configured in the Console |
| SCIM endpoint reconfiguration | Upstream IdPs (Entra / Google Workspace / Okta etc.) re-pointed at Gate's SCIM endpoint |
| Customer IdP-admin onboarding flow | If you use WorkOS Admin Portal, replace with self-service onboarding via Console or Gate Studio |
| AuditKit replacement | Resource servers consuming WorkOS audit events re-pointed at Gate audit ledger or SIEM forwarding |
| Cutover | Sign-ins routed Gate-only; WorkOS connections deactivated per-tenant on a phased schedule |
| Decommission | WorkOS subscription cancelled after a 60-day verification window |
5. See also
- Migration overview — the four-phase migration arc.
- Gate API → Auth — the full Gate SDK surface.
- API → Security — audit-ledger surface and SIEM forwarding contract.
- Pricing — Gate pricing model.