mirror of
https://github.com/EdiFarcas/Giveaway-app.git
synced 2026-06-22 09:00:58 +03:00
Update Giveaway, app-functional
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user