added prisma + nextAuth
This commit is contained in:
15
apps/hub/lib/auth.ts
Normal file
15
apps/hub/lib/auth.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { AuthOptions } from 'next-auth';
|
||||
import { PrismaAdapter } from '@next-auth/prisma-adapter';
|
||||
import Email from 'next-auth/providers/email';
|
||||
import { prisma } from '@repo/db';
|
||||
|
||||
export const options = {
|
||||
providers: [
|
||||
Email({
|
||||
server: process.env.EMAIL_SERVER,
|
||||
from: process.env.EMAIL_FROM,
|
||||
}),
|
||||
],
|
||||
secret: process.env.SECRET,
|
||||
adapter: PrismaAdapter(prisma),
|
||||
} satisfies AuthOptions;
|
||||
Reference in New Issue
Block a user