Hi, I've just discovered that the behavior of the Prismic shareable link has changed. Now, when someone accesses the shareable preview link, they need to log in to Vercel first—our hosting provider. This wasn't the case before.
I appreciate you sending this recording, can you record your issue with this Chrome plugin? It will give us the dev information needed to debug, and you can remove it once you’re done.
I also raised this behavior in the Vercel community. They explained that since the preview URL uses "Draft Mode," Vercel authentication is now required. However, this wasn't the case previously—when sharing the preview link, users could see the preview page immediately without logging into Vercel.
Hi @Phil , i think the fix they are mentioning in the linked article was already integrated (See screenshot below). I am using the latest version of prismic-next but still having the issue. This has been a critical issue for us as we need to share preview links to external parties that need to review things and does not have vercel account
So this is happening because your preview URL contains ?__vercel_draft=1. This URL parameter activates Vercel's draft feature, allowing run-time dynamic rendering (i.e. not build-time static rendering). The Vercel docs mention its use here: Draft Mode.
For reference, this is the previewed URL from your Jam recording:
We tested a Prismic preview share link in an incognito window using one of our test sites, and it worked without a Vercel login. It's possible your share link was created while a Vercel draft was active.
For reference, preview share links that point to the production website should not require a Vercel account. Preview share links that point to a Vercel preview deployment will require a Vercel account or a Vercel configuration that makes preview deployments public.
Hi @Ezekiel , thank you for taking the time to check this out.
The strange thing is, there were no changes in our process for getting the preview link. It was working fine before (which I think still uses the param ?__vercel_draft=1). It's only after our recent NextJS update that it started requiring authentication.
This search param automatically appends to the URL whenever we click the Preview button in the page builder. I believe this is how the unpublished data gets queried, and basically how the preview works, right?
I can share more recordings if needed. Please let me know the best way to send them privately.
Here's the code we have in /api/preview.ts. We're currently using NextJS with the pages directory.
Hello @ezekiel,
I think you're right - the __vercel_draft=1 was automatically appended because I had the Vercel toolbar enabled. After logging out of Vercel in the same browser, the search parameter is no longer automatically appended to the URL. Will keep on testing it out