import NextAuth from "next-auth"
import type { NextAuthOptions } from "next-auth"

// 基础配置，如需启用社交登录请配置对应的 providers
// 参考: https://next-auth.js.org/providers/
export const authOptions: NextAuthOptions = {
  providers: [
    // 示例：启用 Google 登录
    // GoogleProvider({
    //   clientId: process.env.GOOGLE_CLIENT_ID!,
    //   clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
    // }),
    // 示例：启用 GitHub 登录
    // GithubProvider({
    //   clientId: process.env.GITHUB_ID!,
    //   clientSecret: process.env.GITHUB_SECRET!,
    // }),
  ],
  secret: process.env.NEXTAUTH_SECRET || "development-secret-change-in-production",
}

const handler = NextAuth(authOptions)

export { handler as GET, handler as POST }
