storyblok / react-next-boilerplate

Nextjs Storyblok boilerplate
https://www.storyblok.com/tp/add-a-headless-cms-to-next-js-in-5-minutes
64 stars 34 forks source link

Accesstoken is exposed to client when running storyblokInit in _app file #37

Open t-lander opened 1 year ago

t-lander commented 1 year ago

Expected Behavior

The storyblokInit function should be running somewhere on the server so that the API token does not get exposed to the client.

Current Behavior

The storyblokInit function is placed in the _app file, which runs on the clientside. This means that even when using environment variables, it is possible to retrieve the access token from the client.

felipepastor commented 1 year ago

+1