From 62ba10607730a0409eb64beb0bea626f5d8ba4f0 Mon Sep 17 00:00:00 2001 From: Mohammad Torkashvand <mohammad.torkashvand@geant.org> Date: Fri, 24 May 2024 12:36:44 +0200 Subject: [PATCH] remove auth from runtime-config api --- pages/api/runtime-config.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pages/api/runtime-config.ts b/pages/api/runtime-config.ts index 253fca2..ca8e6c9 100644 --- a/pages/api/runtime-config.ts +++ b/pages/api/runtime-config.ts @@ -1,5 +1,4 @@ import { NextApiRequest, NextApiResponse } from 'next'; -import { getSession } from 'next-auth/react'; interface RuntimeConfig { opaPublicBundleUrl: string; @@ -10,11 +9,6 @@ export default async function handler( req: NextApiRequest, res: NextApiResponse<RuntimeConfig | { error: string }>, ) { - const session = await getSession({ req }); - if (!session) { - return res.status(401).json({ error: 'Unauthorized' }); - } - const config: RuntimeConfig = { opaPublicBundleUrl: process.env.OPA_PUBLIC_BUNDLE_URL || '', oidcClientId: process.env.NEXTAUTH_CLIENT_ID || '', -- GitLab