@clerk/nuxt
3.1.24 · 14 Nov 2026MIT36.2k / weekRepositoryHomepagenpmAtom feed
Your version
1.13.35 is the newest release of 1.x.
In short
1 new4 internal
Security
2 advisories affect 1.1.0; 1.13.29 fixes them
- CriticalOfficial Clerk JavaScript SDKs: Middleware-based route protection bypassGHSA-vqx2-fgx2-5wq9 · 16 Apr 2026Fixed in 1.13.28
- HighClerk has an authorization bypass when combining organization, billing, or reverification checksGHSA-w24r-5266-9c3c · 30 Apr 2026Fixed in 1.13.29
Release note
Minor Changes
Add
createRouteMatcher()helper function that allows you to protect multiple pages or API routes.For protecting pages (in a global route middleware):
// createRouteMatcher is automatically imported const isProtectedRoute = createRouteMatcher(['/dashboard(.*)', '/forum(.*)']); export default defineNuxtRouteMiddleware(to => { const { userId } = useAuth(); if (!userId.value && isProtectedRoute(to)) { // Add custom logic to run before redirecting return navigateTo('/sign-in'); } });For protecting API routes:
import { clerkMiddleware, createRouteMatcher } from '@clerk/nuxt/server'; // Unlike pages, you need to import `createRouteMatcher` from `@clerk/nuxt/server` const isProtectedRoute = createRouteMatcher(['/api/user(.*)', '/api/projects(.*)']); export default clerkMiddleware(event => { const { userId } = event.context.auth; if (!userId && isProtectedRoute(event)) { setResponseStatus(event, 401); return 'You are not authorized to access this resource.'; } });
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.