Preview toolbar can't access previewSession cookie in latest chrome release
Closed this issue · 3 comments
When rendering page server side we were getting the preview cookie to forward with requests to the API:
import { previewCookie } from "prismic-javascript";
export function getCookieRef(cookie = ""): string | undefined {
const { [previewCookie]: ref } = parse(cookie);
return ref;
}
It was working three weeks ago, now we don't receive any cookie from the preview redirection.
I think there may have been a regression with the preview redirection from the backend and/or sdk code available at "https://static.cdn.prismic.io/prismic.min.js"
.
I'm not sure this issue is best adressed here, thanks for your support to help me resolve this issue.
The issue is with chrome that recently updated Same Site cookie security, defaulting to "lax", which prevents the toolbar script to cross-site access the cookie.
The fix has to be implemented when setting the previewSession cookie on the backoffice side.
Hi @tcharlat.
We updated our backoffice and the toolbar before the update of google Chrome.
Could you give us more information please.
Do you actually receive some cookie when previewing and if yes, could you give it to us.
If you have any other informations that could be useful (name of the repo, ....) please give us as much as you can.
As there is no reply i'm closing this issue.