Blog · Top lists

Top 5 open-source Clerk alternatives in 2026

Open-source alternatives to Clerk for React, Next.js and everything else: Casdoor, Better Auth, Supabase Auth, Logto and SuperTokens compared on hosting, pricing and how they fit your app.

Casdoor Team · October 20, 2026 · 4 min read

This article is written by the team that builds Casdoor, so we are not neutral, and we say where we think Casdoor fits and where it doesn't. Facts about other products come from their own websites as of October 20, 2026 (listed under Sources) and may have changed. Spotted something out of date? Tell us.

Clerk is popular with React and Next.js developers for a good reason: drop in <SignIn /> and <UserButton /> and you have a polished login, profiles and organizations in an afternoon. Teams look for alternatives when:

  • The bill grows with users. Clerk is free for 50,000 monthly retained users per app, then Pro is $25 per month ($20 billed yearly) plus $0.02 per retained user, and each enterprise SSO connection is $75 per month.
  • They want to own the data or must keep it in their own region or servers.
  • The rest of the stack isn't React. A Go API, a Python admin tool, a mobile app or a third-party tool all need to share the same users.

The five below are open source. They split into two models, and choosing the model first makes the decision easier:

  • Libraries in your app (Better Auth, SuperTokens, Supabase Auth to a degree): auth code runs in or next to your backend, users live in your database. Closest to Clerk's developer experience.
  • A central identity provider (Casdoor, Logto): a separate service with hosted login pages that every app signs in through over OIDC. Better when you have several apps, or need SAML, enterprise SSO for customers, or an admin console.

At a glance

Casdoor Better Auth Supabase Auth Logto SuperTokens
License Apache-2.0 MIT MIT MPL-2.0 Apache-2.0, enterprise features separate
Model Central identity provider TypeScript library in your app Auth server in a Supabase project Central identity provider SDKs plus an auth core service
Languages Any, over OIDC, SAML or CAS TypeScript Any, through Supabase client libraries Any, over OIDC SDKs for Node.js, Python and Go backends
Managed cloud Casdoor Cloud, flat price per instance No Supabase Cloud, per MAU Logto Cloud, per MAU SuperTokens managed, per MAU
Enterprise SSO for your customers Included SSO plugin (OIDC and SAML) SAML on Pro and up: 50 SSO MAU included, then $0.015 each Paid add-on in Logto Cloud SAML login; multi-tenancy is a paid add-on

1. Casdoor

Casdoor is an open-source identity provider: hosted sign-in and sign-up pages you brand per application (logo, theme, custom CSS and your own domain), an admin console for users, organizations and roles, and SDKs for React, Next.js, Vue and most backend languages. Because apps sign in over standard OIDC, SAML or CAS, a Next.js frontend, a Go API, a mobile app and an off-the-shelf tool like Grafana can share the same accounts.

Social login, passkeys, MFA, organizations, Casbin RBAC and enterprise SAML or OIDC connections for your customers are included, with no per-connection fee. Self-host it for free, or use Casdoor Cloud: a dedicated instance from $24/month billed yearly ($29 month to month), with no per-user fees.

Trade-offs: sign-in happens on Casdoor's pages (by redirect or popup) rather than in components rendered inside your own React tree. See Casdoor vs Clerk.

2. Better Auth

Better Auth is an MIT-licensed, framework-agnostic auth framework for TypeScript. It runs inside your app, stores users in your own database, and adds features through plugins, including organizations, two-factor and an SSO plugin that connects your app to customers' OIDC or SAML identity providers.

Trade-offs: it's TypeScript-only, there's no hosted service or admin console, and you own the security of your auth code paths and upgrades.

3. Supabase Auth

Supabase Auth is the obvious choice if you're on Supabase already: users are rows in your Postgres, and row-level security policies use the signed-in user directly. The free plan includes 50,000 MAU; Pro is $25 per month with 100,000 MAU, then $0.00325 per MAU.

Trade-offs: it's designed around a Supabase project, so it's less natural as a standalone IdP for other apps. See Casdoor vs Supabase Auth.

4. Logto

Logto is an open-source identity provider (MPL-2.0) with a modern sign-in experience, organizations for B2B apps, and SDKs for popular frameworks. Logto Cloud has a free tier with 50,000 MAU; Pro starts at $24 per month plus add-ons.

Trade-offs: some features, such as enterprise SSO, are paid add-ons in Logto Cloud. See Casdoor vs Logto.

5. SuperTokens

SuperTokens embeds auth in your app through frontend and backend SDKs, backed by a core service you self-host or let them manage, with prebuilt UI for React. The core is Apache-2.0; managed hosting is free up to 5,000 MAU, then $0.02 per MAU.

Trade-offs: MFA, account linking and multi-tenancy are paid add-ons (MFA is $0.01 per MAU with a $100 monthly minimum), and backend SDKs cover Node.js, Python and Go. See Casdoor vs SuperTokens.

Which one should you choose?

  • One React or Next.js app, TypeScript end to end, and you want auth in your own code and database: Better Auth.
  • Already on Supabase: Supabase Auth.
  • Several apps in different languages, B2B customers who need SSO, or you want an admin console and a flat price: Casdoor.
  • You want a hosted, per-MAU service that's open source: Logto.
  • You like embedded SDKs with a self-hostable core: SuperTokens.

If you're coming from Clerk, Casdoor can import users with bcrypt password hashes, so they keep their passwords. Talk to us if you'd like help with a migration.