update: get active forwarder from api

This commit is contained in:
2026-01-04 13:33:59 +07:00
parent 6a63e2801d
commit 4ac430c1fe
7 changed files with 359 additions and 242 deletions

View File

@@ -2,14 +2,25 @@ import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { db } from "@/lib/db";
import * as schema from "@/lib/schema/auth"
import { jwt } from "better-auth/plugins";
export const auth = betterAuth({
plugins: [jwt()],
socialProviders: {
google: {
clientId: process.env.GOOGLE_CLIENT_ID!,
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
},
},
user: {
additionalFields: {
sshIdentifier: {
type: "string",
nullable: false,
input: false,
}
},
},
database: drizzleAdapter(db, {
provider: "pg",
schema: schema