Skip to content

🔐 Unify Authentication to BetterAuth #10456

@tjx666

Description

@tjx666

Overview

In LobeHub 2.0, we will consolidate to a single authentication solution: BetterAuth. Support for AuthJS (NextAuth) and Clerk will be removed.

Why

  • Celerk's customization is not flexible enough; for example, our clerk business requires the login component to support entering discount codes.
  • Celrk's login component loads slowly.
  • Authjs has been acquired by Better-Auth and is no longer maintained.

What will added

  • email/password auth,this also reduces self-deployment costs
  • magic link signin

Refactoring Plan

Step 1: Support BetterAuth on the next branch ✅

Step 2: Migrate Clerk to BetterAuth on Cloud

  • Experiment with Clerk to BetterAuth migration on cloud
  • After successful migration, remove Clerk support from the open-source version
  • Provide migration scripts and documentation

Step 3: Migrate AuthJS to BetterAuth

  • Implement AuthJS to BetterAuth migration
  • Provide migration scripts and documentation

Current Status

  • Step 1 completed
  • Step 2 in progress
  • Step 3 pending

Important Note

Migrating existing NextAuth or Clerk deployments to better-auth is not yet officially supported. For best results, use better-auth with a clean database on new projects

Metadata

Metadata

Assignees

Labels

feature:authAuthentication and authorizationhosting:cloudOfficial LobeHub Cloudplatform:webWeb platformpriority:highCritical issues requiring immediate attention📝 DocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions