auth flow

This commit is contained in:
alma 2025-05-02 11:13:19 +02:00
parent b7416e33ea
commit 31537efe18
3 changed files with 3 additions and 34 deletions

View File

@ -15,11 +15,11 @@ const menuItems: Record<string, string> = {
dossiers: process.env.NEXT_PUBLIC_IFRAME_DRIVE_URL || '',
'the-message': process.env.NEXT_PUBLIC_IFRAME_THEMESSAGE_URL || '',
qg: process.env.NEXT_PUBLIC_IFRAME_MISSIONVIEW_URL || '',
// Keep any existing custom ones, but use environment variables when available
// Keep any existing custom ones
board: "https://example.com/board",
chapter: "https://example.com/chapter",
flow: "https://example.com/flow",
design: process.env.NEXT_PUBLIC_IFRAME_DESIGN_URL || "https://example.com/design",
design: "https://example.com/design",
gitlab: "https://gitlab.com",
missions: "https://example.com/missions"
}

View File

@ -12,8 +12,7 @@ const SERVICE_URLS: Record<string, string> = {
'agilite': process.env.NEXT_PUBLIC_IFRAME_AGILITY_URL || '',
'dossiers': process.env.NEXT_PUBLIC_IFRAME_DRIVE_URL || '',
'the-message': process.env.NEXT_PUBLIC_IFRAME_THEMESSAGE_URL || '',
'qg': process.env.NEXT_PUBLIC_IFRAME_MISSIONVIEW_URL || '',
'design': process.env.NEXT_PUBLIC_IFRAME_DESIGN_URL || 'https://example.com/design'
'qg': process.env.NEXT_PUBLIC_IFRAME_MISSIONVIEW_URL || ''
};
// Check if a service is Rocket.Chat (they require special authentication)

View File

@ -1,30 +0,0 @@
import { getServerSession } from "next-auth/next";
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
import { redirect } from "next/navigation";
import { ResponsiveIframe } from "@/app/components/responsive-iframe";
export default async function DesignPage() {
const session = await getServerSession(authOptions);
if (!session) {
redirect("/signin");
}
// Use environment variable directly or via proxy
const designUrl = process.env.NEXT_PUBLIC_IFRAME_DESIGN_URL || '';
// Choose between direct URL or proxy - uncomment the one you want to use
// const finalUrl = designUrl; // Direct URL
const finalUrl = `/api/proxy/design`; // Proxy URL
return (
<main className="w-full h-screen bg-black">
<div className="w-full h-full px-4 pt-12 pb-4">
<ResponsiveIframe
src={finalUrl}
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
/>
</div>
</main>
);
}