Skip to content

Contact LV

lv@dablock.com

Juan Lago (LV) uses your details to reply to enquiries (legitimate interest), fulfil a contract with you, or take steps you request before entering one. Privacy and your rights

Authentication for web apps: Supabase, Clerk, Better Auth and alternatives

Decide by requirement, not by ecosystem. If the app already stores data in Postgres and you want sign-in beside it, Supabase Auth is the shortest path. If finished sign-in screens, organizations and enterprise SSO are surfaces you do not want to maintain, Clerk sells exactly that. If the auth code should live in your repository and you accept running its database, email and upgrades, Better Auth is the open-source option that ships passkeys, organizations, SSO and payments as official plugins. Choose Privy only when users need wallets they do not already have, because embedded wallets add key management and transaction work that wallet login never touches.

In this guide

A small team ships a dashboard with sign-ups, a paid plan and a customer list. Authentication looks like a checkbox until the questions arrive: how sessions are verified on the server, what happens when someone loses their phone, how invitations and roles work, and what an enterprise buyer means by single sign-on.

This guide compares four options in depth and five more briefly, and explains what each one makes you responsible for. Treat it as a shortlist tool rather than a verdict.

Shortlist by situation
SituationStart withAlso evaluate
Small SaaS: email, social, a paid plan ↗↗ Clerk if you want finished screens; Supabase if the app also needs a databaseBetter Auth, if your team will run the backend anyway
App that needs a database and backend ↗↗ Supabase Auth, so identity and data share one projectFirebase with Identity Platform
B2B product with organizations ↗↗↗ Clerk with the B2B add-onWorkOS AuthKit, or the Better Auth organization and SSO plugins
Team that wants control of the runtime ↗↗ Better Auth on your own databaseKeycloak, if you need a full identity server you host
Existing Firebase or AWS application ↗↗ Stay on Firebase Authentication or CognitoMigrate only for a named gap, such as passkeys or SSO cost
Product that needs embedded wallets ↗↗ Privy, for wallets, signing and transaction controlsPrivy attached to your existing auth, if you already have users

What to choose

Three ways to get authentication

A managed authentication service runs the identity store and often the sign-in screens for you: Clerk, WorkOS AuthKit, Auth0 and the authentication layer of Privy. You integrate an SDK, get a dashboard and admin tools, and pay per active user or per connection. The trade is control. Sessions, user records and email templates live with the vendor, so export, custom session logic and the price at scale become contract questions rather than code changes.

Authentication bundled into a backend platform is the second model: Supabase Auth with Postgres, Firebase Authentication, Amazon Cognito. Sign-in is one module of a platform you probably need anyway, and the token it issues is the same one your database policies and storage rules read. That cohesion is the real advantage. The constraint is inheritance: you take the platform data model, its quotas and its plan boundaries, including add-ons such as phone MFA or SAML.

The third model is software your team operates: Better Auth, Auth.js and Keycloak. The licence is free, but the runtime is yours: database, migrations, email delivery, rate limiting, backups, security patches and someone to answer a page at night. Compare the invoice with engineering time honestly. A zero-cost licence that needs a week of maintenance every quarter is not cheaper than a $25 plan for a two-person team, and it is cheaper for a team that already runs its backend and wants auth code reviewed like any other feature.

Four distinctions prevent most bad decisions. Authentication proves who someone is; authorization decides which record, file or action they may touch, and your queries still need that check. Organization features give you a directory of teams and memberships, but they do not isolate one customer data from another unless your database enforces it. Signing in with an existing wallet proves ownership of an address, while embedded wallets create wallets and carry signing, recovery and transaction infrastructure. And using one vendor across several applications does not create single sign-on between them; cross-domain SSO is a feature you configure per connection and per domain.

  • Write down who may read one customer record before comparing providers. The answer decides whether you rely on database policies, API checks or both.
  • Label each feature native, official plugin or custom work, and note the plan that unlocks it.

What each option covers

Read this table as a map of responsibilities rather than a scoreboard. A plugin is not a native feature: it needs wiring, tests and version tracking, and an experimental API can change without notice. Plan gating matters as much as capability. Supabase keeps SAML SSO and phone MFA behind Pro add-ons and marks passkeys experimental. Clerk puts passkeys, MFA and SSO on paid plans and bills extra connections separately. Cognito ties passkeys and managed login to its Essentials tier. Confirm the plan, not just the feature list, before designing a flow around it.

Two rows deserve a closer look. Organizations: Clerk ships teams, invitations and roles as product features, though unlimited members and custom roles need its B2B add-on. Better Auth covers similar ground with plugins you configure and enforce yourself.

Capabilities by option, noting native features, plugins and plan gating
OptionSign-in methodsTeams and SSOWalletsHosting and data
Supabase Auth ↗↗↗↗ Email and password, social, magic link and OTP, anonymous sessions. Passkeys experimental.SAML SSO on Pro. Organizations are your own tables, enforced in row-level security.Sign in with Ethereum or Solana. No wallet creation or signing.Hosted with the project or self-hosted. Export through Postgres.
Clerk ↗↗↗ Email and password, social, email and SMS codes. Passkeys and MFA on paid plans. Prebuilt UI.Organizations, invitations and roles. Unlimited members and custom roles need the B2B add-on. SSO billed per connection.Wallet sign-in for MetaMask, Coinbase Wallet, OKX, Base and Solana. No embedded wallets.Fully hosted. Full user export included on every plan.
Better Auth ↗↗↗ Core flows built in. Passkeys, two-factor, OTP, magic link and Ethereum sign-in as official plugins.Organization, admin, SSO (OIDC and SAML) and SCIM plugins. You build the screens and the permission checks.Sign-In with Ethereum plugin. No embedded wallets.Self-hosted: your database, email and servers. Optional hosted dashboard from $20 a month.
Privy ↗↗↗ Email, SMS, social, passkeys and existing EVM or Solana wallets.No self-serve organization features. Advanced SSO and policy controls are listed on enterprise plans.Embedded non-custodial wallets with signing, sending and gas sponsorship.Fully hosted. Keys held in secure hardware. Plan export and recovery early.

The four options in practice

Supabase Auth is the identity module of a Postgres platform. Email and password, social providers, magic links and one-time codes are included, SAML SSO starts on Pro, passkeys sit behind an experimental flag, TOTP multi-factor is included and phone MFA is a Pro add-on, and wallet sign-in with Ethereum or Solana is generally available. Its strongest case is an app that already stores data in Supabase, because the same token feeds row-level security. Its weakest case is a team that wants finished screens or per-tenant admin tooling: you build those, and organizations are tables you design rather than features you enable.

Clerk sells the finished surface: prebuilt components, an account portal, an admin dashboard, and organizations with invitations and roles. Passkeys, MFA, SMS codes and enterprise SSO exist, but the useful ones sit on paid plans, and each SSO or directory connection beyond the first is billed separately. It suits products where sign-in is customer-facing and the team would rather not maintain forms, emails and recovery flows. The cost of that convenience is that identity data and session behaviour follow Clerk configuration; anything unusual becomes a support question or a custom session claim.

Better Auth is a TypeScript library you install into your own server, with users and sessions in your database. Core flows are built in; passkeys, two-factor authentication, organizations, SSO, SCIM, Stripe subscriptions and Sign-In with Ethereum arrive as official plugins you enable and test. It fits teams that want the auth code in their repository, need to customize session shape or data residency, and accept responsibility for migrations, email and monitoring. The Better Auth team now handles Auth.js security patches and recommends Better Auth for new projects, but it is not a shortcut for a team without backend capacity: invitations, permissions and recovery are still your design.

Privy combines authentication with wallet infrastructure. Users can sign in with email, SMS, social accounts, passkeys or an existing EVM or Solana wallet, and the service can create non-custodial embedded wallets, sign and send transactions, sponsor gas and apply policies. That is a larger commitment than wallet login: you inherit key management, recovery, transaction UX and chain-specific limits. Choose it when the product moves assets or signs on behalf of users. If you only need to prove that someone controls an address, wallet sign-in from Supabase, Clerk or the Better Auth Ethereum plugin avoids the custody questions.

Other options, and what to do about Auth.js

Five more services earn attention when a requirement is already settled: an existing cloud, enterprise buyers or hosting control. Each has one specific reason to appear on a shortlist and one specific cost in return. None of them is a general upgrade over the four above; they win on a constraint.

Auth.js, formerly NextAuth.js, is the library much of the JavaScript ecosystem still runs. Since 22 September 2025 it has been maintained by the Better Auth team, which continues security patches and urgent fixes, and Vercel acquired Better Auth in July 2026. The Auth.js documentation still labels next-auth v5 as beta and v4 as maintenance. New projects should start on Better Auth. Existing applications have no urgent reason to migrate: plan the move around a feature you need and follow the published migration guide, which changes route handlers, session access and client calls rather than only a dependency version.

Before you choose, list what actually moves. Password hashes export from most managed providers and can be reused when the algorithm matches, but some exports omit them and force resets. OAuth identities re-link per provider. TOTP secrets and passkeys generally do not transfer, so users re-enrol. Existing sessions end at cutover, and wallet-linked accounts need a fresh signature because an address alone is not proof of ownership. Run the export while both systems are live, test a batch of real accounts, and keep the old sign-in path available for a rollback window.

Five more options, with the reason to consider each and its tradeoff
OptionSpecific reason to consider itTradeoff
Firebase Authentication ↗↗ The app already uses Firebase, or you need reliable phone sign-in and Google SDKs on mobile.MFA, SAML and OIDC require the Identity Platform upgrade. No native passkeys. SMS billed per message.
Auth0 ↗ Enterprise buyers recognise it, and organizations, SSO and extensibility cover unusual identity requirements.Beyond the free 25,000 external users, plans are quoted per account, and custom rules add configuration and review work.
WorkOS AuthKit ↗ User management is free up to one million monthly active users, and enterprise SSO plus directory sync are the core product.SSO and directory connections cost $125 each at low volume, and audit log streaming is billed separately.
Amazon Cognito The product already runs on AWS, or you want identity inside an existing cloud bill and compliance boundary.Three tiers with different features, passkeys only from Essentials, federated users billed separately, and a console organised around AWS concepts.
Keycloak ↗ You must self-host identity: data residency, air-gapped environments, or full control of the login theme and flows.You operate clusters, upgrades, backups and patches, with no vendor to call when a release breaks a mapper.

Costs, checklist and common mistakes

Authentication bills on different units, so compare the unit before the price. Supabase charges per monthly active user (MAU) per project. Clerk charges per monthly retained user (MRU), counted when someone returns at least 24 hours after signing up, per application, plus monthly retained organizations for B2B features. Privy charges per MAU with a signature allowance. WorkOS includes the first million monthly active users and charges $2,500 a month per additional million, plus a fee per SSO or directory connection. Cognito bills per MAU per user pool, with federated SAML and OIDC users on a separate meter. None of these definitions are interchangeable.

A worked example: 8,000 monthly active users, 60 organizations of about ten members, email and social sign-in, no wallets. On Supabase Pro the plan is $25 a month and the compute credit covers one Micro instance, so $25 before email and extra compute, with 8,000 MAU well under the 100,000 included. On Clerk Pro, $25 a month or $20 billed annually covers 8,000 MRU under the 50,000 allowance and 60 organizations under the 100 included per app; unlimited members per organization or custom roles need the $100 B2B add-on. Privy costs $499 a month at that user count before any wallet use. Better Auth costs nothing in licence fees, plus the database, email and maintenance you already pay for, and optionally $20 a month for the hosted dashboard and audit logs.

Four mistakes repeat. Treating MAU and MRU as the same number, which understates or overstates a bill. Enabling organizations and assuming tenant isolation, when every query still needs a scope check. Choosing a managed provider for its free tier and discovering that SSO, passkeys or phone MFA sit on the next plan. And hiring a wallet infrastructure provider for a site that only displays an address. Shortlist two candidates, run your real flows for a week, and read the export documentation before you commit.

  • Does the product need organizations now, or only a user table you can extend later?
  • Will an enterprise customer ask for SAML this year? If so, price the connection, not only the plan.
  • Do you need passkeys, on which plan, and are they native or experimental?
  • Who fixes a broken password reset at two in the morning, your team or a support queue?
  • Which records must leave with you, in which format, and does the export include hashes, MFA and sessions?
What the main options charge for, and what the price excludes
OptionBilling unit and free allowanceCommonly excluded
Supabase Auth ↗ Monthly active users per project: 50,000 free, 100,000 on Pro at $25, then $0.00325 each.Compute beyond the credit, email sending, phone MFA at $75 a month, SSO beyond the included users.
Clerk ↗ Retained users per application: 50,000 free, then $0.02 falling to $0.012. Pro $25, Business $300.B2B add-on at $100, extra SSO connections at $75 each, SMS at $0.01, directory-sync billing from January 1, 2027.
Better Auth ↗ Nothing for the library. The hosted infrastructure plan is $20 a month; enterprise is custom.Database, compute, email, SMS, monitoring, and engineering time for upgrades and security patches.
Privy ↗ Active users: free to 499, $299 to 2,499, $499 to 9,999, then $2,000 base plus usage.Signatures above 50,000 a month at $0.01 each, users above 10,000 at $0.05, and gas you sponsor.

Common questions

Is an open-source auth library really free?

The licence is free: Better Auth is MIT and Keycloak is Apache-2.0, so you can read, modify and self-host the code. The running system is not free. You still pay for a database, email delivery, monitoring, backups and the engineering time to apply releases and respond to incidents. Budget those lines before comparing the total with a managed plan, and note that Better Auth also sells an optional hosted dashboard from $20 a month for audit logs.

Do organization features isolate each customer data?

No. An organization is a membership record: it tells you who belongs to a team and which role they hold. Isolation is a property of your data access, so every query, file read and action has to filter by the organization the session belongs to, ideally in the database through row-level security or equivalent policies. Test it by signing in as a member of one organization and requesting another organization record by id. Provider features such as Clerk organizations reduce the UI work, not the enforcement work.

When is wallet login not enough, and embedded wallets needed?

Wallet login answers one question: does this person control this address? It is enough for gated content, token-held communities or signature-based verification. Embedded wallets answer a different one: where does a user without a wallet keep keys, sign and recover access? That requires key management, recovery flows, transaction handling and per-chain limits, which is what Privy provides. If the product only verifies ownership, Supabase, Clerk and the Better Auth Ethereum plugin all cover it without taking custody responsibilities.

Sources and method

Reviewed official product, pricing, plugin and migration documentation for every provider on 27 November 2026. Prices, free allowances and feature status change; confirm them on the linked page before committing. No hands-on tests, benchmarks or security review.

Sources checked on .

  1. Supabase · Auth documentationsupabase.com
  2. Supabase · pricingsupabase.com
  3. Supabase · passkey authenticationsupabase.com
Show 21 more sourcesShow fewer
  1. Supabase · Sign in with Web3supabase.com
  2. Clerk · pricingclerk.com
  3. Clerk · sign-up and sign-in optionsclerk.com
  4. Clerk · organizationsclerk.com
  5. Better Auth · documentationbetter-auth.com
  6. Better Auth · infrastructure pricingbetter-auth.com
  7. Better Auth · plugin cataloguebetter-auth.com
  8. Better Auth · SSO pluginbetter-auth.com
  9. Better Auth · Sign-In with Ethereum pluginbetter-auth.com
  10. Better Auth · Auth.js joins Better Authbetter-auth.com
  11. Auth.js · migrating to Better Authauthjs.dev
  12. Auth.js · integrations and statusauthjs.dev
  13. Vercel · Vercel acquires Better Authvercel.com
  14. Privy · pricingprivy.io
  15. Privy · authentication overviewdocs.privy.io
  16. Privy · embedded walletsdocs.privy.io
  17. Firebase · Authentication documentationfirebase.google.com
  18. Google Cloud · Identity Platform pricingcloud.google.com
  19. Auth0 · pricingauth0.com
  20. WorkOS · pricingworkos.com
  21. Keycloak · project documentationkeycloak.org
Explore all resources