mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: update user and authentication schema with two-factor support
This commit is contained in:
@@ -2,7 +2,11 @@ import type { IncomingMessage } from "node:http";
|
||||
import * as bcrypt from "bcrypt";
|
||||
import { betterAuth } from "better-auth";
|
||||
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
||||
import { createAuthMiddleware, organization } from "better-auth/plugins";
|
||||
import {
|
||||
createAuthMiddleware,
|
||||
organization,
|
||||
twoFactor,
|
||||
} from "better-auth/plugins";
|
||||
import { desc, eq } from "drizzle-orm";
|
||||
import { db } from "../db";
|
||||
import * as schema from "../db/schema";
|
||||
@@ -85,6 +89,7 @@ export const auth = betterAuth({
|
||||
},
|
||||
|
||||
plugins: [
|
||||
twoFactor(),
|
||||
organization({
|
||||
async sendInvitationEmail(data, request) {
|
||||
const inviteLink = `https://example.com/accept-invitation/${data.id}`;
|
||||
|
||||
Reference in New Issue
Block a user