Hi, something I just noticed recently, I have the following code (in a weweb formula) to retrieve supabase token in cookie in order to call supabase function (as it is currently not supported in the plugin). but this formula only works Im editor mode (within workflow editor) and production, once I toggled to preview in editor this cookie becomes null. This really blocks my workflow, any clue of whats going on? Thanks ahead!
function getCookie(name) {
const value = ; ${document.cookie}
;
const parts = value.split(; ${name}=
);
if (parts.length === 2) return parts.pop().split(â;â).shift();
}
const cookie = getCookie(âsb-access-tokenâ)
if (cookie === null || cookie === undefined || cookie === ââ) {
return null
}
return "Bearer "+ cookie