diff --git a/.env b/.env index c8900d5a..90fb50b6 100644 --- a/.env +++ b/.env @@ -37,3 +37,4 @@ NEXT_PUBLIC_IFRAME_HEALTHVIEW_URL=https://espace.slm-lab.net/apps/health NEXT_PUBLIC_IFRAME_MISSIONVIEW_URL=https://connect.slm-lab.net/realms/cercle/protocol/openid-connect/auth?response_type=code&scope=openid&client_id=page.slm-lab.net&state=f72528f6756bc132e76dd258691b71cf&redirect_uri=https%3A%2F%2Fpage.slm-lab.net%2Fwp-admin%2F NEXT_PUBLIC_IFRAME_USERSVIEW_URL=https://example.com/users-view NEXT_PUBLIC_IFRAME_THEMESSAGE_URL=https://lemessage.slm-lab.net/admin/ +NEXT_PUBLIC_IFRAME_AI_ASSISTANT_URL=https://alma.slm-lab.net diff --git a/app/ai-assistant/page.tsx b/app/ai-assistant/page.tsx index 6e8e80d5..53b90397 100644 --- a/app/ai-assistant/page.tsx +++ b/app/ai-assistant/page.tsx @@ -1,13 +1,24 @@ -export default function AIAssistantPage() { +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 Page() { + const session = await getServerSession(authOptions); + + if (!session) { + redirect("/signin"); + } + return ( -
-