tianji/src/server/model/auth.ts

12 lines
392 B
TypeScript
Raw Normal View History

2024-05-14 12:53:19 +00:00
import { AuthConfig } from '@auth/core';
import Nodemailer from '@auth/core/providers/nodemailer';
import { env } from '../utils/env.js';
2024-05-25 18:35:33 +00:00
import { PrismaAdapter } from '@auth/prisma-adapter';
import { prisma } from './_client.js';
2024-05-14 12:53:19 +00:00
export const authConfig: Omit<AuthConfig, 'raw'> = {
2024-05-25 18:35:33 +00:00
providers: [Nodemailer(env.auth.email)],
adapter: PrismaAdapter(prisma),
2024-05-14 12:53:19 +00:00
secret: env.auth.secret,
};