@@ -20,7 +20,6 @@ import { getDefinitionsAndProcessIdForEveryCallActivity } from '@proceed/bpmn-he
2020
2121import { SettingsOption } from './settings-modal' ;
2222import { asyncMap } from '@/lib/helpers/javascriptHelpers' ;
23- import { env } from '@/lib/ms-config/env-vars' ;
2423import { ColorOptions } from '../(dashboard)/[environmentId]/(automation)/executions/[processId]/instance-coloring' ;
2524import InstanceDocumentationPage from './instance-documentation-page' ;
2625import { Metadata } from 'next' ;
@@ -30,6 +29,7 @@ import db from '@/lib/data/db';
3029import { isUserErrorResponse } from '@/lib/user-error' ;
3130import { getInstance } from '@/lib/data/instance' ;
3231import { refetchDeployments } from '@/lib/executions/deployment-server-actions' ;
32+ import { getMSConfig } from '@/lib/ms-config/ms-config' ;
3333
3434interface PageProps {
3535 searchParams : Promise < {
@@ -152,7 +152,8 @@ export async function generateMetadata(props: PageProps): Promise<Metadata> {
152152 if ( typeof token !== 'string' ) return { } ;
153153
154154 try {
155- const key = env . SHARING_ENCRYPTION_SECRET ;
155+ const config = await getMSConfig ( ) ;
156+ const key = config . SHARING_ENCRYPTION_SECRET ;
156157 const { processId, timestamp, embeddedMode } = jwt . verify ( token , key ! ) as TokenPayload ;
157158 const versionId = version as string | undefined ;
158159 const versionLabel = versionId ?? 'Latest' ;
@@ -221,7 +222,8 @@ const SharedViewer = async (props: PageProps) => {
221222 let activeSpaceId = userId || '' ;
222223 let activeIsOrg = false ;
223224
224- const key = env . SHARING_ENCRYPTION_SECRET ;
225+ const config = await getMSConfig ( ) ;
226+ const key = config . SHARING_ENCRYPTION_SECRET ;
225227 let processData : Process | undefined ;
226228 let iframeMode ;
227229 let defaultSettings = settings as SettingsOption ;
0 commit comments