mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 12:27:44 +00:00
docs: add ai tooling (#4859)
This commit is contained in:
@@ -29,6 +29,7 @@ import { APIMethod } from "@/components/api-method";
|
||||
import { LLMCopyButton, ViewOptions } from "./page.client";
|
||||
import { GenerateAppleJwt } from "@/components/generate-apple-jwt";
|
||||
import { Callout } from "@/components/ui/callout";
|
||||
import { AddToCursor } from "@/components/mdx/add-to-cursor";
|
||||
export default async function Page({
|
||||
params,
|
||||
}: {
|
||||
@@ -129,6 +130,7 @@ export default async function Page({
|
||||
TypeTable,
|
||||
Features,
|
||||
ForkButton,
|
||||
AddToCursor,
|
||||
DatabaseTable,
|
||||
Accordion,
|
||||
Accordions,
|
||||
|
||||
29
docs/components/mdx/add-to-cursor.tsx
Normal file
29
docs/components/mdx/add-to-cursor.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import Link from "next/link";
|
||||
|
||||
export const AddToCursor = () => {
|
||||
return (
|
||||
<div className="w-max">
|
||||
<Link
|
||||
href="cursor://anysphere.cursor-deeplink/mcp/install?name=Better%20Auth&config=eyJ1cmwiOiJodHRwczovL21jcC5jaG9ua2llLmFpL2JldHRlci1hdXRoL2JldHRlci1hdXRoLWJ1aWxkZXIvbWNwIn0%3D"
|
||||
className="dark:hidden"
|
||||
>
|
||||
<img
|
||||
src="https://cursor.com/deeplink/mcp-install-dark.svg"
|
||||
alt="Add Better Auth MCP to Cursor"
|
||||
height="32"
|
||||
/>
|
||||
</Link>
|
||||
|
||||
<Link
|
||||
href="cursor://anysphere.cursor-deeplink/mcp/install?name=Better%20Auth&config=eyJ1cmwiOiJodHRwczovL21jcC5jaG9ua2llLmFpL2JldHRlci1hdXRoL2JldHRlci1hdXRoLWJ1aWxkZXIvbWNwIn0%3D"
|
||||
className="dark:block hidden"
|
||||
>
|
||||
<img
|
||||
src="https://cursor.com/deeplink/mcp-install-light.svg"
|
||||
alt="Add Better Auth MCP to Cursor"
|
||||
height="32"
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -3,11 +3,7 @@ title: Introduction
|
||||
description: Introduction to Better Auth.
|
||||
---
|
||||
|
||||
Better Auth is a framework-agnostic authentication and authorization framework for TypeScript. It provides a comprehensive set of features out of the box and includes a plugin ecosystem that simplifies adding advanced functionalities. Whether you need 2FA, multi-tenancy, multi-session support, or even enterprise features like SSO, it lets you focus on building your application instead of reinventing the wheel.
|
||||
|
||||
## Why Better Auth?
|
||||
|
||||
*Authentication in the TypeScript ecosystem has long been a half-solved problem. Other open-source libraries often require a lot of additional code for anything beyond basic authentication features. Rather than just pushing third-party services as the solution, I believe we can do better as a community—hence, Better Auth.*
|
||||
Better Auth is a framework-agnostic, universal authentication and authorization framework for TypeScript. It provides a comprehensive set of features out of the box and includes a plugin ecosystem that simplifies adding advanced functionalities. Whether you need 2FA, passkey, multi-tenancy, multi-session support, or even enterprise features like SSO, creating your own IDP, it lets you focus on building your application instead of reinventing the wheel.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -17,6 +13,51 @@ Better Auth aims to be the most comprehensive auth library. It provides a wide r
|
||||
|
||||
...and much more!
|
||||
|
||||
## LLMs.txt
|
||||
---
|
||||
|
||||
Better Auth provides an LLMs.txt file that helps AI models understand how to interact with your authentication system. You can find it at [https://better-auth.com/llms.txt](https://better-auth.com/llms.txt).
|
||||
## AI tooling
|
||||
|
||||
### LLMs.txt
|
||||
|
||||
Better Auth exposes an `LLMs.txt` that helps AI models understand how to integrate and interact with your authentication system. See it at [https://better-auth.com/llms.txt](https://better-auth.com/llms.txt).
|
||||
|
||||
### MCP
|
||||
|
||||
Better Auth provides an MCP server so you can use it with any AI model that supports the Model Context Protocol (MCP).
|
||||
|
||||
<AddToCursor />
|
||||
|
||||
<Tabs items={["Claude Code", "Open Code", "Manual"]}>
|
||||
<Tab value="Claude Code">
|
||||
```bash title="terminal"
|
||||
claude mcp add --transport http better-auth https://mcp.chonkie.ai/better-auth/better-auth-builder/mcp
|
||||
```
|
||||
</Tab>
|
||||
<Tab value="Open Code">
|
||||
```json title="opencode.json"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"mcp": {
|
||||
"Better Auth": {
|
||||
"type": "remote",
|
||||
"url": "https://mcp.chonkie.ai/better-auth/better-auth-builder/mcp",
|
||||
"enabled": true,
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab value="Manual">
|
||||
```json title="mcp.json"
|
||||
{
|
||||
"Better Auth": {
|
||||
"url": "https://mcp.chonkie.ai/better-auth/better-auth-builder/mcp"
|
||||
}
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<Callout>
|
||||
We provide a first‑party MCP, powered by [Chonkie](https://chonkie.ai). You can alternatively use [`context7`](https://context7.com/) and other MCP providers.
|
||||
</Callout>
|
||||
|
||||
Reference in New Issue
Block a user