import Gitea from "@/lib/gitea";
import NextAuth from "next-auth";
import { prisma } from "@/lib/prisma";
import GitHub from "next-auth/providers/github";
import { PrismaAdapter } from "@auth/prisma-adapter";

export const { handlers, signIn, signOut, auth } = NextAuth({
  adapter: PrismaAdapter(prisma),
  providers: [
    GitHub,
    Gitea({
      enterprise: {
        baseUrl: process.env.GITEA_BASE_URL,
      },
    }),
  ],
});
