auth flow
This commit is contained in:
parent
b7416e33ea
commit
31537efe18
@ -15,11 +15,11 @@ const menuItems: Record<string, string> = {
|
|||||||
dossiers: process.env.NEXT_PUBLIC_IFRAME_DRIVE_URL || '',
|
dossiers: process.env.NEXT_PUBLIC_IFRAME_DRIVE_URL || '',
|
||||||
'the-message': process.env.NEXT_PUBLIC_IFRAME_THEMESSAGE_URL || '',
|
'the-message': process.env.NEXT_PUBLIC_IFRAME_THEMESSAGE_URL || '',
|
||||||
qg: process.env.NEXT_PUBLIC_IFRAME_MISSIONVIEW_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",
|
board: "https://example.com/board",
|
||||||
chapter: "https://example.com/chapter",
|
chapter: "https://example.com/chapter",
|
||||||
flow: "https://example.com/flow",
|
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",
|
gitlab: "https://gitlab.com",
|
||||||
missions: "https://example.com/missions"
|
missions: "https://example.com/missions"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,8 +12,7 @@ const SERVICE_URLS: Record<string, string> = {
|
|||||||
'agilite': process.env.NEXT_PUBLIC_IFRAME_AGILITY_URL || '',
|
'agilite': process.env.NEXT_PUBLIC_IFRAME_AGILITY_URL || '',
|
||||||
'dossiers': process.env.NEXT_PUBLIC_IFRAME_DRIVE_URL || '',
|
'dossiers': process.env.NEXT_PUBLIC_IFRAME_DRIVE_URL || '',
|
||||||
'the-message': process.env.NEXT_PUBLIC_IFRAME_THEMESSAGE_URL || '',
|
'the-message': process.env.NEXT_PUBLIC_IFRAME_THEMESSAGE_URL || '',
|
||||||
'qg': process.env.NEXT_PUBLIC_IFRAME_MISSIONVIEW_URL || '',
|
'qg': process.env.NEXT_PUBLIC_IFRAME_MISSIONVIEW_URL || ''
|
||||||
'design': process.env.NEXT_PUBLIC_IFRAME_DESIGN_URL || 'https://example.com/design'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check if a service is Rocket.Chat (they require special authentication)
|
// Check if a service is Rocket.Chat (they require special authentication)
|
||||||
|
|||||||
@ -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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user