Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 27 Oct 15:54
· 55 commits to main since this release
f9fbb3b

Minor Changes

  • 11ed32f: Add experimental custom server middleware. Useful for custom logic when protecting your API routes.

    Example usage:

    // server/middleware/clerk.ts
    import { clerkMiddleware } from "vue-clerk/server";
    
    export default clerkMiddleware((event) => {
      const { auth } = event.context;
    
      if (!auth.userId && event.path.startsWith("/api")) {
        throw createError({
          statusCode: 401,
          message: "Unauthorized",
        });
      }
    });