Shareable preview link not working

@phil, do you have any updates about this regarding Gatsby? Sharable previews have never worked, either for my Nextjs or Gatsby websites - but a client started asking about them so need to find a solution.

Do you have an example Gatsby project where the sharable previews work?

Hi @kris,

I wasn't aware of any issues with Gatsby and shareable links, the issues with Next.js are unique to that framework, I'm going to reach out to the team to find out more about this.


Can you tell me which Gatsby plugin you are using? Because shareable previews should work really well with Gatsby.

I'm using

"gatsby-plugin-prismic-previews": "^4.1.3",
"gatsby-source-prismic": "^4.1.6",

There is an open issue on github regarding that [v4] Shareable links not working · Issue #403 · prismicio/prismic-gatsby · GitHub

If the person is not logged into Prismic, there are not able to preview the shared link

Ah, I wasn't aware of this issue. I'll ping Angelo to get an update on this for you.

Hey @kris,

Apologies for the late reply. I replied to your question on GitHub regarding previews and Gatsby.

GitHub Issue: [v4] Shareable links not working · Issue #403 · prismicio/prismic-gatsby · GitHub

Reposting here for others:

Hey @kb1995, sorry for the delayed response - my mistake! Shareable links are supported in Gatsby as normal, but there are some parameters around its usage (this is for previews in general, not just for Gatsby).

If using Chrome, previews will not work in Incognito browsers

Chrome blocks cross-site cookies which is required for previews to work. The Prismic toolbar sets a cookie on the domain which is then read on your deployed site. Previews are only activated on your site if that cookie is present and readable.

This means share links will not work in Incognito browsers for the same reason. To test if share links work, copy the link, sign out of Prismic, then open the link in a normal browser. It should load.

Related link: Enabling 3rd Party Cookies for Chrome “Incognito” Mode and Safari for Mac | Kaltura Knowledge Center

If using Safari, previews will not work unless cross-site cookie are enabled

Safari blocks cross-site cookies by default. As described above, cross-site cookies are needed to support Prismic previews.

To enable cross-site cookies in Safari, open Safari's Preferences, navigate to the Privacy section, and uncheck "Prevent cross-site tracking."

This means share links will not work in Safari browsers for the same reason. Ensure cross-site cookies are allowed in Safari before testing a share link.

Related link: Preview mode doesn't load in Safari


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.