mirror of
https://github.com/EdiFarcas/Giveaway-app.git
synced 2026-06-22 07:00:57 +03:00
Youtube handle, working v2
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user