Open Source Alternatives to Auth0

Updated 5 December 2026 · 7 alternatives · Backend, Hosting & Auth

Auth0 is Okta's authentication-as-a-service platform, priced per monthly active user. Here are 7 open source alternatives, 6 of them self-hostable.
Top pickKeycloakApache-2.0 · ★ 38.2k
Best self-hostedKeycloakApache-2.0 · ★ 38.2k
Hosted optionZitadelAGPL-3.0 · ★ 15.7k
Auth0 is made byOktaProprietary

Auth0 alternatives compared

Project Licence Type Self-host Cloud option GitHub stars
Keycloak Apache-2.0 Self-hosted ✓ Yes — ★ 38.2k
authentik MIT Self-hosted ✓ Yes — ★ 26.6k
Zitadel AGPL-3.0 Self-hosted ✓ Yes ✓ Yes ★ 15.7k
Logto MPL-2.0 Self-hosted ✓ Yes ✓ Yes ★ 15k
Ory Kratos Apache-2.0 Self-hosted ✓ Yes ✓ Yes ★ 14k
Better Auth MIT Developer tool — — ★ 31k
Hanko AGPL-3.0 Self-hosted ✓ Yes ✓ Yes ★ 9.1k

The 7 open source alternatives to Auth0

1

Keycloak

Apache-2.0 · Self-hosted · ★ 38.2k on GitHub · since 2014

Visit site ↗

Keycloak is a mature identity and access management server supporting single sign-on with OpenID Connect and SAML, user federation with LDAP and Active Directory, and social logins. It is a CNCF project.

  • SSO with OIDC and SAML
  • LDAP and Active Directory federation
  • Social login and MFA
  • CNCF incubating project
Self-hosted Source code ↗ Also replaces Okta
2

authentik

MIT · Self-hosted · ★ 26.6k on GitHub · since 2018

Visit site ↗

authentik is an identity provider focused on flexibility, with OAuth2/OIDC, SAML, LDAP and RADIUS support, a visual flow designer and a proxy for apps without built-in authentication.

Note: The core is MIT-licensed; enterprise features are under a separate licence.

  • OIDC, SAML, LDAP and RADIUS
  • Visual authentication flows
  • Proxy for legacy apps
  • Popular in homelabs and companies
Self-hosted Source code ↗ Also replaces Okta
3

Zitadel

AGPL-3.0 · Self-hosted · ★ 15.7k on GitHub · since 2020

Visit site ↗

Zitadel is a Swiss identity and access management platform built for multi-tenancy, with passkeys, SSO, organisations and an event-sourced audit trail. Available as cloud or self-hosted.

  • Multi-tenant organisations
  • Passkeys and MFA
  • OIDC and SAML
  • Full audit trail
Self-hosted Cloud option Source code ↗ Also replaces Okta
4

Logto

MPL-2.0 · Self-hosted · ★ 15k on GitHub · since 2021

Visit site ↗

Logto is a developer-friendly authentication platform with sign-in UI, social logins, MFA, organisations and SDKs for many frameworks. Use Logto Cloud or self-host it.

  • Prebuilt sign-in experience
  • Social and enterprise SSO
  • Organisations and RBAC
  • SDKs for 30+ frameworks
Self-hosted Cloud option Source code ↗
5

Ory Kratos

Apache-2.0 · Self-hosted · ★ 14k on GitHub · since 2019

Visit site ↗

Ory Kratos is an API-first identity server for registration, login, MFA and account recovery. It is headless, so you build your own UI, and it scales to very large user bases.

  • Headless API
  • MFA and passkeys
  • Social sign-in
  • Part of the Ory stack (Hydra, Keto)
Self-hosted Cloud option Source code ↗ Also replaces Okta, Clerk
6

Better Auth

MIT · Developer tool · ★ 31k on GitHub · since 2024

Visit site ↗

Better Auth is a TypeScript library that adds email, social, passkey and two-factor login to your app, storing users in your own database. Plugins add organisations, SSO and more.

  • Email, social and passkey login
  • Organisations and roles
  • Two-factor authentication
  • Works with any TS framework
Source code ↗ Also replaces Clerk
7

Hanko

AGPL-3.0 · Self-hosted · ★ 9.1k on GitHub · since 2022

Visit site ↗

Hanko is an authentication server with drop-in web components for login and profile pages. It focuses on passkeys and also supports passwords, passcodes and social logins.

Note: The backend is AGPL-3.0; the frontend elements and SDKs are MIT.

  • Passkeys first
  • Drop-in web components
  • Social and SAML login
  • Hosted or self-hosted
Self-hosted Cloud option Source code ↗ Also replaces Clerk

How to choose an open source alternative to Auth0

Check OIDC and SAML support, social logins, MFA and passkeys, user management and SDKs for your stack.

If you want your data on your own server, look at Keycloak, authentik and Zitadel. Don't want to run a server? Zitadel, Logto and Ory Kratosoffer an official hosted version.

Not sure where to start? Browse all backend, hosting & auth projects.

Auth0 alternatives: FAQ

What is the best open source alternative to Auth0?

Keycloak is the most complete open source alternative to Auth0 on our list, followed by authentik and Zitadel. The best choice depends on what you need: Check OIDC and SAML support, social logins, MFA and passkeys, user management and SDKs for your stack.

Is there a free alternative to Auth0?

Yes. Every alternative listed here is open source, so the software itself is free to use. Some, such as Zitadel, Logto and Ory Kratos, also sell an optional hosted version if you don't want to run it yourself.

Can I self-host an alternative to Auth0?

Yes: Keycloak, authentik, Zitadel, Logto and Ory Kratos can all be installed on your own server, so your data stays on infrastructure you control.

Why switch from Auth0 to open source software?

Auth0 is proprietary software owned by Okta: you can't see the code, and pricing, features and terms can change at any time. Open source alternatives publish their code under licences such as Apache-2.0, MIT and AGPL-3.0, can be audited by anyone, and can't lock you in, because the software can always be forked or self-hosted.

Other popular alternatives

Browse 350+ open source alternativesSearch by product, category or licence