Youtube handle, working v2

This commit is contained in:
EdiFarcas
2025-04-29 13:28:17 +03:00
parent 7fd2080d58
commit 6cff4acc36
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import { authOptions } from "../api/auth/[...nextauth]/route";
import { redirect } from "next/navigation"; import { redirect } from "next/navigation";
import AdminClient from "./AdminClient"; // Adjust the import path as necessary import AdminClient from "./AdminClient"; // Adjust the import path as necessary
const allowedEmails = ["farcas.edi@gmail.com"]; // Add allowed Gmail accounts here const allowedEmails = ["farcas.edi@gmail.com", "farcas.claudiu@gmail.com"]; // Add allowed Gmail accounts here
export default async function AdminPage() { export default async function AdminPage() {
const session = await getServerSession(authOptions); const session = await getServerSession(authOptions);
+1
View File
@@ -14,6 +14,7 @@ export const authOptions = {
GoogleProvider({ GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID!, clientId: process.env.GOOGLE_CLIENT_ID!,
clientSecret: process.env.GOOGLE_CLIENT_SECRET!, clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
allowDangerousEmailAccountLinking: true,
authorization: { authorization: {
params: { params: {
scope: "openid email profile https://www.googleapis.com/auth/youtube.readonly", scope: "openid email profile https://www.googleapis.com/auth/youtube.readonly",