diff --git a/app/api/auth/[...nextauth].js b/app/api/auth/[...nextauth].js deleted file mode 100644 index 3e7ca90..0000000 --- a/app/api/auth/[...nextauth].js +++ /dev/null @@ -1,30 +0,0 @@ -import NextAuth from 'next-auth'; -import Providers from 'next-auth/providers'; - -export const authOptions = { - providers: [ - Providers.GitHub({ - clientId: process.env.GITHUB_CLIENT_ID, - clientSecret: process.env.GITHUB_CLIENT_SECRET, - }), - // Add other providers here (e.g., Google, Email, etc.) - ], - secret: process.env.NEXTAUTH_SECRET, // Ensure this is set in your .env file - callbacks: { - async session(session, user) { - // Add custom session properties if needed - session.user.id = user.id; - session.user.role = user.role; // Example: Add role to session - return session; - }, - async jwt(token, user) { - if (user) { - token.id = user.id; - token.role = user.role; // Example: Add role to token - } - return token; - }, - }, -}; - -export default NextAuth(authOptions); \ No newline at end of file