Preview links your clients can open without an account
Share a draft page with a client as a signed link that expires, without inviting them to Quillstack.
On this page3 sections
Clients want to see a page before it goes live. Until now that meant inviting them as a user, or sending a screenshot that was out of date by lunch.
Signed preview links fix that. You create a link for one draft, send it, and it stops working after the time you pick.
Set it up
Add a preview URL to the content model
Under Model → Preview, enter the route on the client’s site that renders a draft, for example
https://staging.client.com/api/preview?slug={slug}.Verify the token on the site
Quillstack adds a
qs_tokenquery parameter. Your preview route checks it with the workspace’s preview secret before it shows draft content.Share the link
Open a draft, click Share preview, pick how long it stays valid (1 hour to 14 days) and copy the link.
Checking the token
The token is a short JWT signed with the workspace’s preview secret. The SDK checks the signature and the expiry, and returns the draft it points to:
import { verifyPreviewToken } from "@quillstack/preview";
const draft = await verifyPreviewToken(token, process.env.QS_PREVIEW_SECRET);
// draft.entryId, draft.locale, draft.expiresAt
Without the SDK, any JWT library works. Check the issuer, which is always quillstack:
import { jwtVerify } from "jose";
const secret = new TextEncoder().encode(process.env.QS_PREVIEW_SECRET);
const { payload } = await jwtVerify(token, secret, { issuer: "quillstack" });
Revoking a link
Every link shows up under Draft → Shared previews with the last time it was opened. Click Revoke and the next request fails, even if the link hasn’t expired yet.