Prerequisites

Learn how to install and configure Better Auth and Shadcn UI in your project.

1

Install Better Auth

Install Better Auth by running the following command Better Auth Docslink

code-editor
pnpm add better-auth
2

Install Shadcn UI

Run the init command to create a new Next.js project or to setup an existing one.

code-editor
pnpm dlx shadcn@latest init
3

Add registry

Add the auth-ui registry in your components.json

code-editor

components.json

{
  "registries": {
    "@auth-cn": "https://auth.uprizing.me/r/{name}.json",
  }
}