You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,20 @@
1
1
# Better Auth Convex
2
2
3
-
True local installation of Better Auth in your Convex app schema, eliminating component isolation and `ctx.runQuery`/`ctx.runMutation` overhead.
3
+
Local installation of Better Auth directly in your Convex app schema, with direct database access instead of component-based queries.
4
4
5
5
## Why Better Auth Convex?
6
6
7
-
The official `@convex-dev/better-auth` component stores auth tables in an isolated component schema. While the docs mention ["local install"](https://convex-better-auth.netlify.app/local-install), it's still component-isolated, not truly local to your app.
7
+
The official `@convex-dev/better-auth` component stores auth tables in a component schema. This package provides an alternative approach with direct schema integration.
8
8
9
-
**This package provides actual local installation:**
9
+
**This package provides direct local installation:**
10
10
11
-
1.**Auth tables live in YOUR app schema** - Not in a component boundary
11
+
1.**Auth tables live in your app schema** - Not in a component boundary
12
12
2.**Direct database access** - No `ctx.runQuery`/`ctx.runMutation` overhead (>50ms latency that increases with app size)
13
13
3.**Unified context** - Auth triggers can directly access and modify your app tables transactionally
14
14
4.**Full TypeScript inference** - Single schema, single source of truth
15
15
16
16
> [!WARNING]
17
-
> BREAKING CHANGE from @convex-dev/better-auth
18
-
>
19
-
> Auth tables are stored in your app schema instead of the component schema. If you're already in production with `@convex-dev/better-auth`, you'll need to write a migration script to move your auth data.
17
+
> BREAKING CHANGE: Auth tables are stored in your app schema instead of the component schema. If you're already in production with `@convex-dev/better-auth`, you'll need to write a migration script to move your auth data.
20
18
21
19
## Prerequisites
22
20
@@ -56,7 +54,7 @@ import schema from './schema'; // YOUR app schema with auth tables
56
54
// 1. Internal API functions for auth operations
57
55
const authFunctions:AuthFunctions=internal.auth;
58
56
59
-
// 2. Auth client with triggers that run in YOUR app context
57
+
// 2. Auth client with triggers that run in your app context
0 commit comments