Skip to content
Snippets Groups Projects
Commit 62ba1060 authored by Mohammad Torkashvand's avatar Mohammad Torkashvand
Browse files

remove auth from runtime-config api

parent 3e0653b4
No related branches found
No related tags found
1 merge request!26remove auth from runtime-config api
Pipeline #86975 passed
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 || '',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment