Alternatives / Auth0

Auth0 Alternatives in 2026: Open Source & Self-Hosted

These projects cover different layers of identity: turnkey identity providers, authentication frameworks, modular identity components, and authorization engines. Some are close Auth0 replacements; Permify and Cerbos handle permissions after authentication rather than user login.

Maxime DERAME's profile

Written by Maxime DERAME

Last updated:

Authentication and authorization

Authentication answers who a user is: passwords, passkeys, social login, MFA, OAuth, and SSO. Authorization answers what that user may do, such as edit a document or invite organization members. Auth0 covers both layers to some extent. Hanko, Keycloak, ZITADEL, Logto, SuperTokens, Authgear, and Better Auth primarily handle authentication and identity; Permify and Cerbos focus on authorization and must be combined with an identity provider.

Full IAM services and application frameworks

Keycloak, authentik, ZITADEL, Logto, and Authgear operate as identity services that applications connect to through protocols such as OIDC and SAML. Better Auth runs inside a TypeScript application and uses infrastructure the application controls. This avoids a separate identity server but puts more authentication responsibility inside the application stack.

Passkey-first authentication

Hanko supports passkeys alongside passwords, email codes, MFA, and social authentication. Pocket ID intentionally makes passkeys the only user authentication method, making it a lightweight fit for small self-hosted environments that want to avoid passwords.

Enterprise SSO and federation

For workforce SSO, compare support for SAML, OIDC, SCIM, LDAP, Active Directory, organizations, and multi-tenancy. Keycloak and authentik are strong for workforce and enterprise federation. ZITADEL and Logto are attractive for modern B2B SaaS applications.

Open-source core and commercial features

Check the exact license and feature boundaries before choosing. authentik has an MIT-licensed core alongside Enterprise functionality; SuperTokens has Apache-2.0 core with separately licensed ee components; Ory's Apache-2.0 core coexists with commercial enterprise features. ZITADEL uses AGPL-3.0 with limited directory exceptions, while the other projects have their own stated licenses and terms.

Why look for a Auth0 alternative?

Teams consider Auth0 alternatives for self-hosting, predictable infrastructure costs, control over user data, avoiding monthly active user pricing, and support for OIDC, OAuth, SAML, passkeys, MFA, social login, organizations, SCIM, and fine-grained permissions. Auth0 bundles these into a managed platform; open-source projects range from full IAM systems to in-app frameworks and individual components.

#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.

37KApache-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
#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.1KMITIntegrated 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
#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.7KMIT 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
#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.3KApache-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
#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.1KAGPL-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
#6

Logto

OIDC and OAuth 2.1 authentication and authorization platform

MPL-2.0 platform with login flows, social authentication, MFA, organizations, SSO, RBAC, machine-to-machine authentication, connectors, and SDKs for many frameworks. Supports self-hosting and hosted service.

14.6KMPL-2.0Self-hosted

Pricing: Self-hosted open-source edition and hosted cloud service; some advanced services are cloud-oriented.

  • OIDC and OAuth 2.1
  • Password and passwordless login, social auth, MFA, organizations, and SSO
  • RBAC, machine-to-machine auth, connectors, and 30+ framework SDKs
  • Younger than Keycloak
  • Smaller enterprise ecosystem
  • Some advanced services are cloud-oriented
#7

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.9KApache-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
#8

Pocket ID

Lightweight self-hosted OIDC provider centered on passkeys

BSD-2-Clause OpenID Connect and OAuth 2.0 identity provider that deliberately keeps its feature set small and uses passkeys as the only user authentication method. Includes LDAP synchronization, SCIM, groups, audit logs, REST API, and simple Docker deployment.

9.2KBSD-2-ClauseSelf-hosted

Pricing: Free and open source; self-hosted deployment.

  • Lightweight passkey-only login and OIDC certification
  • OAuth 2.0, LDAP synchronization, SCIM, and groups
  • Audit logs, REST API, and simple Docker deployment
  • Intentionally limited scope
  • Passkeys only
  • Less suitable for complex B2C flows or a broad hosted-login ecosystem
#9

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.

9KAGPL-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
#10

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.8KOpen-source codebaseSelf-hosted

Pricing: Open-source self-hostable project; verify current license terms before adoption.

  • 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
#11

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.

6KAGPL-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
#12

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.6KApache-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
#13

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.

2KApache-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 Auth0 alternatives

AlternativeTypeLicenseStatusGitHub starsSelf-hosted
HankoAuthenticationAGPL-3.0Open source~9kYes
KeycloakIAMApache-2.0Open source~37kYes
Better AuthAuth frameworkMITOpen source~30.1kIn-app
authentikIdP / IAMMIT coreOpen source / commercial~25.7kYes
ZITADELIAMAGPL-3.0Open source~15.1kYes
LogtoAuth + authorizationMPL-2.0Open source~14.6kYes
SuperTokensAuthenticationApache-2.0 coreOpen core~15.3kYes
OryIdentity infrastructureApache-2.0 coreOpen source / open core~13.9k KratosYes
Pocket IDLightweight IdPBSD-2-ClauseOpen source~9.2kYes
HexclaveUser infrastructureOpen-source codebaseOpen source~6.8kYes
PermifyAuthorizationAGPL-3.0Open source~6kYes
CerbosAuthorizationApache-2.0Open core~4.6kYes
AuthgearIAMApache-2.0Open source / managed~2kYes

Which one should you choose?

Want the most mature open-source IAM

Keycloak has a long enterprise track record and supports OIDC, SAML, LDAP, Active Directory, social identity providers, MFA, custom flows, and authorization.

Keycloak

Want a modern Auth0-style identity platform

ZITADEL combines developer APIs, OIDC, OAuth, SAML, SCIM, MFA, passkeys, organizations, multi-tenancy, audit logs, cloud, and self-hosting.

ZITADEL

Want authentication inside a TypeScript app

Better Auth runs within the application stack and provides TypeScript-first authentication without a separate identity server.

Better Auth

Want a passkey-focused authentication platform

Hanko makes passkeys a first-class feature while also supporting passwords, email codes, MFA, SSO, social login, and self-hosting.

Hanko

Want a lightweight passkey-only OIDC provider

Pocket ID deliberately keeps its scope small and uses passkeys as the user authentication method for self-hosted OIDC applications.

Pocket ID

Need SSO for internal applications

authentik supports OIDC, OAuth, SAML, LDAP, RADIUS, SCIM, proxy authentication, MFA, and custom flows; Keycloak is another mature option.

authentik

Want developer-focused authentication SDKs

SuperTokens offers authentication recipes, session management, multi-tenancy, and backend and frontend SDKs, with separately licensed Enterprise components.

SuperTokens

Want modular identity infrastructure

Ory separates identity and authentication, OAuth/OIDC, and authorization into components such as Kratos, Hydra, and Keto.

Ory

Need authorization without user authentication

Permify provides RBAC, ABAC, and relationship-based authorization and should be paired with an identity provider.

Permify

Want policy-as-code authorization

Cerbos externalizes application permissions into policies and decision points, but does not provide user login or authentication.

Cerbos

Need authentication for B2B and B2C applications

Authgear combines passwords, social and passwordless login, MFA, biometrics, passkeys, SSO, user management, and authorization.

Authgear

Want authentication plus broader SaaS infrastructure

Hexclave combines identity with teams, permissions, payments, billing, email, analytics, and other product infrastructure.

Hexclave

Want a permissive license for an in-app framework

Better Auth uses MIT; Keycloak and Authgear use Apache-2.0, Pocket ID uses BSD-2-Clause, and Logto uses MPL-2.0.

Better Auth