Add better-auth integration and update dependencies in package.json and bun.lock
This commit is contained in:
@@ -23,10 +23,12 @@
|
||||
"vite": "^7.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@convex-dev/better-auth": "^0.9.6",
|
||||
"@mmailaender/convex-better-auth-svelte": "^0.2.0",
|
||||
"@sgse-app/backend": "workspace:*",
|
||||
"@tanstack/svelte-form": "^1.19.2",
|
||||
"zod": "^4.0.17",
|
||||
"convex": "catalog:",
|
||||
"convex-svelte": "^0.0.11",
|
||||
"@sgse-app/backend": "workspace:*"
|
||||
"zod": "^4.0.17"
|
||||
}
|
||||
}
|
||||
|
||||
6
apps/web/src/lib/auth.ts
Normal file
6
apps/web/src/lib/auth.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { createAuthClient } from "better-auth/svelte";
|
||||
import { convexClient } from "@convex-dev/better-auth/client/plugins";
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
plugins: [convexClient()],
|
||||
});
|
||||
3
apps/web/src/routes/api/auth/[...all]/+server.ts
Normal file
3
apps/web/src/routes/api/auth/[...all]/+server.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { createSvelteKitHandler } from "@mmailaender/convex-better-auth-svelte/sveltekit";
|
||||
|
||||
export const { GET, POST } = createSvelteKitHandler();
|
||||
Reference in New Issue
Block a user