From f770183d1f338185e8848446bb43c9e18ace79bf Mon Sep 17 00:00:00 2001 From: Sherakama Date: Fri, 2 Feb 2024 16:12:53 -0800 Subject: [PATCH] Bugfix: Add editor token... Everywhere (#224) --- app/(editor)/editor/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(editor)/editor/page.tsx b/app/(editor)/editor/page.tsx index 5faff6e9..e193e9c0 100644 --- a/app/(editor)/editor/page.tsx +++ b/app/(editor)/editor/page.tsx @@ -95,7 +95,7 @@ async function getStoryData({ path }: PageProps['searchParams']): Promise { - const validationString = searchParams['_storyblok_tk[space_id]'] + ':' + process.env.STORYBLOK_ACCESS_TOKEN + ':' + searchParams['_storyblok_tk[timestamp]']; + const validationString = searchParams['_storyblok_tk[space_id]'] + ':' + process.env.STORYBLOK_PREVIEW_EDITOR_TOKEN + ':' + searchParams['_storyblok_tk[timestamp]']; const validationToken = crypto.createHash('sha1').update(validationString).digest('hex'); if (searchParams['_storyblok_tk[token]'] == validationToken && Number(searchParams['_storyblok_tk[timestamp]']) > Math.floor(Date.now()/1000)-3600) {