feat: ditch triplit, move to postgresql + drizzle orm
This commit is contained in:
+7
-12
@@ -1,18 +1,13 @@
|
||||
import { triplitAdapter } from '@daveyplate/better-auth-triplit';
|
||||
import { HttpClient } from '@triplit/client';
|
||||
import { drizzleAdapter } from "@better-auth/drizzle-adapter/relations-v2";
|
||||
import { db } from "../server/lib/db";
|
||||
import { betterAuth } from 'better-auth/minimal';
|
||||
import { schema } from '../triplit/schema';
|
||||
|
||||
const httpClient = new HttpClient({
|
||||
schema,
|
||||
serverUrl: process.env.NUXT_PUBLIC_TRIPLIT_URL,
|
||||
token: process.env.TRIPLIT_SERVICE_TOKEN,
|
||||
});
|
||||
import * as schema from '../drizzle/schema';
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: triplitAdapter({
|
||||
httpClient,
|
||||
secretKey: process.env.BETTER_AUTH_SECRET,
|
||||
database: drizzleAdapter(db, {
|
||||
provider: "pg",
|
||||
schema,
|
||||
usePlural: true,
|
||||
}),
|
||||
|
||||
session: {
|
||||
|
||||
Reference in New Issue
Block a user