@backmatter/next 0.0.28 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backmatter/next",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "description": "Experimental Next.js adapter for Backmatter. APIs will break. Not ready for production.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -47,7 +47,7 @@
47
47
  "test": "bun test"
48
48
  },
49
49
  "dependencies": {
50
- "@backmatter/core": "^0.0.22",
50
+ "@backmatter/core": "^0.0.23",
51
51
  "@mdx-js/mdx": "^3.1.1",
52
52
  "remark-gfm": "^4.0.1",
53
53
  "@backmatter/studio": "^0.0.6"
@@ -340,7 +340,7 @@ export function createPreviewRoute(
340
340
  const token = cookieFrom(req, PREVIEW_SESSION_COOKIE);
341
341
  const claims = secret && token ? await readPreviewSession(secret, token) : null;
342
342
  const workspaceOk = !cms.config.workspaceId || claims?.workspaceId === cms.config.workspaceId;
343
- if (!claims || !token || !workspaceOk) {
343
+ if (!secret || !claims || !token || !workspaceOk) {
344
344
  return Response.json({ error: "unauthorized" }, { status: 401 });
345
345
  }
346
346
  const confirm = deps.confirmSession ?? ((current: string) => confirmSessionOnApi(cms.config.apiUrl, current));