Skip to content

v0.91.0

Choose a tag to compare

@github-actions github-actions released this 18 Sep 07:22
· 52 commits to main since this release
cbfd9b1

0.91.0 (2025-09-18)

BREAKING CHANGES

Removed @fastify/cors and @fastify/formbody from @prefabs.tech/fastify-user

These plugins are no longer bundled with @prefabs.tech/fastify-user.
They are now declared as peer dependencies, which means you must install and register them yourself.

Required Changes

  • Install the missing dependencies:
npm install @fastify/cors @fastify/formbody
  • Update your server setup:
import corsPlugin from "@fastify/cors";
import formBodyPlugin from "@fastify/formbody";
import userPlugin, { SUPERTOKENS_CORS_HEADERS } from "@prefabs.tech/fastify-user";
import Fastify from "fastify";

const start = async () => {
  // Create fastify instance
  const fastify = Fastify({
    logger: config.logger,
  });
  ....

  // Register cors plugin
  await fastify.register(corsPlugin, {
    origin: config.appOrigin,
    allowedHeaders: ["Content-Type", ...SUPERTOKENS_CORS_HEADERS],
    methods: ["GET", "HEAD", "PUT", "PATCH", "POST", "DELETE"],
    credentials: true,
  });

  // Register form-body plugin
  await fastify.register(formBodyPlugin);

  ...
  
  await fastify.listen({
    port: config.port,
    host: "0.0.0.0",
  });
};

start();