From Supabase to Clerk to Better Auth

· security · Source ↗

TLDR

  • Val Town migrated auth from Clerk to Better Auth after three years of rate limits, outages, and architectural conflicts with social-app patterns.

Key Takeaways

  • Clerk’s model assumes users only access their own data; social sites like Val Town need full user tables, forcing a costly Clerk-to-DB sync via webhooks.
  • Clerk’s session refresh architecture made it a single point of failure: Clerk downtime took down the entire site, not just login flows.
  • Clerk’s loadUser option hit a 5 req/sec account-wide rate limit in production, discovered only after launch.
  • Better Auth runs self-hosted, keeping session management in Val Town’s own infrastructure; WorkOS AuthKit was close second but still vendor-dependent.
  • LLM-assisted dual-auth shim allowed a two-week parallel Clerk/Better Auth transition without a hard cutover.

Hacker News Comment Review

  • No substantive HN discussion yet.

Original | Discuss on HN