Alternatives / WorkOS

11 open-source alternatives

11 Best Open Source WorkOS Alternatives in 2026

Looking for an open source WorkOS alternative? We compared 11 open source authentication and authorization platforms by license, SSO, multi-tenancy, self-hosting, and pricing. They range from full identity providers to auth libraries and authorization engines, and several use licenses that are not standard open source.

Maxime DERAME's profile

Written by Maxime DERAME

Last updated:

Best WorkOS alternatives at a glance

AlternativeBest forLicense
KeycloakFull identity provider with SAML and OIDCApache-2.0
ZITADELMulti-tenant B2B identityAGPL-3.0 with limited directory exceptions
authentikSelf-hosted identity providerMIT core
Better AuthTypeScript auth frameworkMIT
HankoPasskey-first authenticationAGPL-3.0
SuperTokensFlexible, language-agnostic authApache-2.0 core / Enterprise components
OryModular enterprise identityApache-2.0 core
HexclaveAuth plus payments and emailMIT clients / AGPL-3.0 servers
AuthgearB2C and B2B apps with biometricsApache-2.0
PermifyAuthorization only: RBAC, ABAC, ReBACAGPL-3.0
CerbosPolicy-based authorization onlyApache-2.0 core

How we chose these WorkOS alternatives

We looked for open-source tools that overlap with WorkOS's core: letting a B2B app offer enterprise SSO, directory sync, and organization-level access. We verified each project's license, recent activity, stars, and self-hosting in its repository. WorkOS is a hosted API, so we separate full identity providers from libraries and authorization-only engines, and flag open-core licenses. See our methodology for the full criteria.

Important: authorization-only tools do not replace WorkOS alone

Permify and Cerbos handle authorization, meaning who can do what, not authentication or SSO. They complement an identity provider rather than replace WorkOS on their own. Better Auth is a TypeScript framework, so it is aimed at TypeScript applications.

Closest to WorkOS

Keycloak, Zitadel, and Authentik are the closest, as full identity providers with SSO, SAML, OIDC, MFA, and multi-tenancy. Keycloak is powerful but complex to configure, Zitadel is available as a managed service or self-hosted with strong multi-tenant support, and Authentik deploys with Kubernetes, Terraform, or Docker Compose.

Important: licenses and open-core parts

Keycloak is Apache-2.0 and Better Auth is MIT. Zitadel is AGPL-3.0 with limited directory exceptions, and Permify is AGPL-3.0. Ory's core is Apache-2.0, with enterprise features under commercial agreements, SuperTokens is Apache-2.0 with enterprise code under ee, and Cerbos is Apache-2.0 at its core. Authentik is MIT with an enterprise directory, Hanko is AGPL-3.0 with a separately licensed elements directory, Hexclave is MIT for clients and AGPL-3.0 for servers, and Authgear is Apache-2.0.

Maintenance status

All eleven projects had commits within days or weeks of this update. Ory's last commit was in July 2026.

Why look for a WorkOS alternative?

WorkOS is a proprietary hosted service priced per connection for enterprise SSO and directory sync, so each enterprise customer you onboard adds cost, and identity data is stored on its platform. Open-source alternatives let you self-host identity, avoid per-connection pricing, and keep user data under your control, at the cost of running and securing the identity layer yourself.

keycloak.org
1

Keycloak

Established open-source identity and access management

Apache-2.0 IAM platform providing SSO, social login, LDAP and Active Directory federation, OpenID Connect, OAuth 2.0, SAML, MFA, user management, authorization policies, and customizable authentication flows.

37.3K9KApache-2.0Self-hosted

Pricing: Free and open source; self-hosted or operated through third-party services.

  • OIDC, OAuth, SAML, LDAP, and Active Directory
  • SSO, social login, MFA, federation, and fine-grained authorization
  • Mature ecosystem and enterprise adoption
  • Complex configuration and steep learning curve
  • Heavier operational footprint than auth libraries
  • Custom themes and flows can require significant expertise
better-auth.com
2

Better Auth

TypeScript-first authentication framework for applications

MIT authentication and authorization framework that runs inside a TypeScript application rather than as a standalone identity service. Supports email/password, social login, two-factor authentication, organizations, sessions, and an extensible plugin ecosystem.

30.3K3KMITIntegrated in application

Pricing: Open-source framework; you operate the application and its infrastructure.

  • MIT license and TypeScript-first design
  • Framework-agnostic with email/password, social login, and 2FA
  • Organizations, sessions, plugins, and type-safe API without a separate identity server
  • Not a managed Auth0-style service by itself
  • Authentication responsibilities remain in your application
  • Enterprise federation may require additional setup
goauthentik.io
3

authentik

Self-hosted identity provider for SSO and enterprise IAM

Identity provider with an MIT-licensed core and a separate Enterprise offering. Supports OAuth2/OIDC, SAML, LDAP, RADIUS, SCIM, proxy authentication, MFA, conditional flows, and application access management.

25.9K2.1KMIT coreSelf-hosted

Pricing: Self-hosted open-source core; Enterprise features and support are commercial.

  • OIDC, OAuth2, SAML, LDAP, RADIUS, and SCIM
  • MFA, proxy provider, and custom authentication flows
  • Docker and Kubernetes support with broad homelab and enterprise adoption
  • More infrastructure than an in-app authentication library
  • Enterprise functionality exists separately
  • Configuration can become complex
supertokens.com
4

SuperTokens

Developer-oriented authentication platform and SDKs

Open-core authentication platform with Apache-2.0 core and separately licensed Enterprise code under ee/. Supports password and passwordless login, social sign-in, sessions, user management, access control, multi-tenancy, and backend and frontend SDKs.

15.3K835Apache-2.0 core / Enterprise componentsSelf-hosted

Pricing: Self-hosted open-source core and managed cloud; Enterprise components are separately licensed.

  • Apache-2.0 core with self-hosting and managed cloud
  • Password, passwordless, and social authentication with session management
  • Multi-tenancy and developer-friendly frontend/backend SDKs
  • Enterprise components use separate licensing
  • Less complete workforce IAM than Keycloak
  • SAML and enterprise federation are not central to the open-source core
zitadel.com
5

ZITADEL

Identity infrastructure for SaaS and B2B applications

AGPL-3.0 identity platform with limited directory exceptions, providing OIDC, OAuth2, SAML, SCIM, MFA, passkeys, organizations, multi-tenancy, audit logs, roles, APIs, managed cloud, and self-hosting.

15.3K1.4KAGPL-3.0 with limited directory exceptionsSelf-hosted

Pricing: Managed cloud and self-hosted deployment options.

  • OIDC, OAuth2, SAML, and SCIM
  • Passkeys, MFA, organizations, multi-tenancy, and audit logs
  • API-first B2B SaaS fit with hosted cloud and self-hosting
  • More complex than lightweight authentication libraries
  • AGPL terms require consideration for modified network deployments
  • Smaller integration ecosystem than Auth0
ory.sh
6

Ory

Modular open-source identity and access infrastructure

Apache-2.0 core identity stack including Kratos for identity and authentication, Hydra for OAuth2/OIDC, and Keto for authorization. Provides headless APIs, passkeys, social login, MFA, cloud-native deployment, Kubernetes support, and self-hosting; some enterprise features use commercial agreements.

13.9K1.2KApache-2.0 coreSelf-hosted

Pricing: Self-hosted open-source components and managed services; enterprise features are commercial.

  • Modular components for authentication, OAuth/OIDC, and authorization
  • Apache-2.0 core with passkeys, social login, MFA, and headless APIs
  • Cloud-native and Kubernetes-friendly with self-hosting
  • Requires more architecture decisions
  • Multiple components may be needed
  • Enterprise functionality is separately licensed and less turnkey than Auth0
hanko.io
7

Hanko

Authentication platform built around passkeys

AGPL-3.0 authentication platform for passwords and passwordless login, email passcodes, social sign-in, SSO, MFA, WebAuthn passkeys, web components, and self-service profiles. Available as self-hosted software or Hanko Cloud.

9K1KAGPL-3.0Self-hosted

Pricing: Open-source self-hosted option and managed cloud service.

  • Passkeys are a first-class feature alongside passwords
  • Email passcodes, social login, SSO, and MFA
  • Web components, self-service profiles, self-hosting, and cloud option
  • Smaller ecosystem than Keycloak
  • Less extensive enterprise federation
  • More focused on authentication than workforce IAM
hexclave.com
8

Hexclave

Self-hostable user infrastructure for SaaS products

Open-source-codebase self-hostable platform combining authentication and authorization with teams, multi-tenancy, payments, billing, transactional email, analytics, passkeys, and API keys. Broader than a conventional identity provider.

6.9K525MIT clients / AGPL-3.0 serversSelf-hosted

Pricing: Open source and self-hostable; enterprise licenses and a hosted service are available.

  • Authentication, authorization, teams, and multi-tenancy
  • Payments, billing, email, analytics, passkeys, and API keys
  • Designed as broader infrastructure for SaaS applications
  • Much broader than Auth0
  • Younger project with smaller ecosystem
  • Extra modules may be unnecessary for teams needing only authentication
permify.co
9

Permify

Fine-grained authorization service inspired by Zanzibar

AGPL-3.0 self-hosted authorization service for RBAC, ABAC, and relationship-based access control. It evaluates what authenticated users may do; it does not provide Auth0-style authentication or user login.

6K329AGPL-3.0Self-hosted

Pricing: Open-source self-hosted service; hosted offerings may be separate.

  • RBAC, ABAC, and ReBAC with Zanzibar-style relationships
  • Centralized policy engine and API-based permission checks
  • Self-hosted authorization service
  • Does not authenticate users
  • Not a direct Auth0 replacement
  • Must be paired with an identity provider and adds infrastructure
cerbos.dev
10

Cerbos

Policy-as-code authorization engine

Apache-2.0 core authorization engine that evaluates policies through local or remote decision points. Supports RBAC, ABAC, YAML policies, GitOps workflows, language-agnostic SDKs, and self-hosting; enterprise management features are separate.

4.6K216Apache-2.0 coreSelf-hosted

Pricing: Open-source self-hosted engine; enterprise management features are separate.

  • RBAC and ABAC policies as code
  • YAML policies and GitOps workflows
  • Language-agnostic SDKs and stateless low-latency decision points
  • Does not provide user authentication
  • Requires an existing identity provider
  • Enterprise management features are separate
authgear.com
11

Authgear

Open-source identity and access management for B2B and B2C

Apache-2.0 authentication and IAM server with passwords, passwordless and social login, MFA, biometrics, passkeys, SSO, user management, and authorization. Can be self-hosted or used through Oursky's managed service.

2.1K130Apache-2.0Self-hosted

Pricing: Self-hosted server and managed service options.

  • Apache-2.0 with password and passwordless sign-in
  • Social login, MFA, biometrics, passkeys, and SSO
  • B2B and B2C user management, authorization, and self-hosting
  • Much smaller community and fewer integrations than Auth0
  • Managed-product documentation is more prominent
  • Smaller ecosystem than Keycloak or ZITADEL

Compare WorkOS alternatives

AlternativeTypeLicenseSelf-hostedBest for
HankoPasskey-first authAGPL-3.0 (elements directory separate)YesPasskeys
KeycloakIdentity providerApache-2.0YesSSO and federation
Better AuthAuth frameworkMITLibraryTypeScript apps
authentikIdentity providerMIT core + enterpriseYesSelf-hosted SSO
ZITADELIdentity platformAGPL-3.0YesMulti-tenant B2B
SuperTokensAuth platformApache-2.0 + eeYesFlexible auth
OryIdentity infrastructureApache-2.0 coreYesModular identity
HexclaveUser infrastructureMIT / AGPL-3.0YesAuth plus payments
PermifyAuthorizationAGPL-3.0YesRBAC, ABAC, ReBAC
CerbosAuthorizationApache-2.0 coreYesPolicy-based access
AuthgearIdentity platformApache-2.0YesB2C and B2B apps

Which one should you choose?

Want a full identity provider with SAML and OIDC

Keycloak offers SSO, social login, and fine-grained authorization under Apache-2.0, but it is complex to configure.

Keycloak

Want multi-tenant B2B identity

Zitadel offers hosted login, SSO, MFA, RBAC, and multi-tenant support, as a managed service or self-hosted.

ZITADEL

Building a TypeScript app

Better Auth is an MIT TypeScript framework with email and password, social sign-on, 2FA, and multi-tenant support.

Better Auth

Want passkey-first login

Hanko is passkey-first with 2FA, SSO, and social login, with legacy password support for gradual migration.

Hanko

Need fine-grained authorization

Permify is an authorization service supporting RBAC, ABAC, and ReBAC, but it does not do authentication.

Permify