Update Giveaway, app-functional

This commit is contained in:
EdiFarcas
2025-04-28 14:46:10 +03:00
parent 4f6455ffbe
commit 7f744e1e9f
6 changed files with 51 additions and 26 deletions
+6
View File
@@ -2,6 +2,7 @@ import NextAuth, { SessionStrategy } from "next-auth";
import GoogleProvider from "next-auth/providers/google";
import { PrismaAdapter } from "@next-auth/prisma-adapter";
import { db } from "@/lib/db"; // Ensure this is the correct path to your Prisma client
import axios from "axios";
if (!db) {
throw new Error("Prisma client is not initialized. Check your database configuration.");
@@ -13,6 +14,11 @@ export const authOptions = {
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID!,
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
authorization: {
params: {
scope: "openid email profile https://www.googleapis.com/auth/youtube.readonly",
},
},
}),
],
secret: process.env.NEXTAUTH_SECRET,