Packages

@clerk/astro

4.1.27 · 18 Nov 2026MIT46.5k / weekRepositoryHomepagenpmAtom feed

Your version

3.4.8

25 Jun 2026Where it was published

3.4.20 is the newest release of 3.x.

In short

1 deprecated1 fixed2 internal

  • Deprecated

    Deprecate createRouteMatcher() in favor of resource-based auth checks.

Release note

Patch Changes

  • Fix custom user button menu item rendering for Astro's stricter compiler.

  • Deprecated

    Deprecate createRouteMatcher() in favor of resource-based auth checks.

    Instead of protecting routes only from middleware, move auth checks into each protected Astro page, API route, or server-side handler:

    import type { APIRoute } from 'astro';
    
    export const GET: APIRoute = ({ locals }) => {
      const { userId } = locals.auth();
    
      if (!userId) {
        return new Response('Unauthorized', { status: 401 });
      }
    
      return Response.json({ userId });
    };

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.