Packages

@clerk/react-router

3.7.6 · 19 Nov 2026MIT138.1k / weekRepositoryHomepagenpmAtom feed

Your version

2.1.0

6 Oct 2025Where it was published

2.4.19 is the newest release of 2.x.

In short

1 new4 internal

Security

1 advisory affects 2.1.0; 2.4.13 fixes them

Release note

Minor Changes

  • Added organizationSyncOptions option to clerkMiddleware(). It's used to activate a specific organization or personal account based on URL path parameters.

    Usage:

    // app/root.tsx
    export const middleware: Route.MiddlewareFunction[] = [
      clerkMiddleware({
        organizationSyncOptions: {
          organizationPatterns: [
            '/orgs/:slug', // Match the org slug
            '/orgs/:slug/(.*)', // Wildcard match for optional trailing path segments
          ],
        },
      }),
    ];

    To learn more about best practices for using organization slugs to manage the active organization, check out this guide.

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.