import NextAuth, { type DefaultSession } from "next-auth";
import AzureAD from "next-auth/providers/azure-ad";
import { NextResponse } from "next/server";
import { DrizzleAdapter } from "@auth/drizzle-adapter";
import { db } from "@/db/db-connection";
export const {
handlers: { GET, POST },
auth,
signIn,
} = NextAuth({
secret: process.env.NEXTAUTH_SECRET as string,
trustHost: true,
session: {
strategy: "database",
},
adapter: DrizzleAdapter(db),
providers: [
//...provider stuff
],
callbacks: {
//...callback stuff
},
});
import NextAuth, { type DefaultSession } from "next-auth";
import AzureAD from "next-auth/providers/azure-ad";
import { NextResponse } from "next/server";
import { DrizzleAdapter } from "@auth/drizzle-adapter";
import { db } from "@/db/db-connection";
export const {
handlers: { GET, POST },
auth,
signIn,
} = NextAuth({
secret: process.env.NEXTAUTH_SECRET as string,
trustHost: true,
session: {
strategy: "database",
},
adapter: DrizzleAdapter(db),
providers: [
//...provider stuff
],
callbacks: {
//...callback stuff
},
});