Packages

@clerk/astro

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

Your version

2.9.0

4 Jun 2025Where it was published

2.17.18 is the newest release of 2.x.

In short

3 new3 internal

Security

3 advisories affect 2.9.0; 2.17.11 fixes them

Release note

Minor Changes

  • Machine authentication is now supported for advanced use cases via the backend SDK. You can use clerkClient.authenticateRequest to validate machine tokens (such as API keys, OAuth tokens, and machine-to-machine tokens). No new helpers are included in these packages yet.

    Example (Astro):

    import { clerkClient } from '@clerk/astro/server';
    
    export const GET: APIRoute = ({ request }) => {
      const requestState = await clerkClient.authenticateRequest(request, {
        acceptsToken: 'api_key',
      });
    
      if (!requestState.isAuthenticated) {
        return new Response(401, { message: 'Unauthorized' });
      }
    
      return new Response(JSON.stringify(requestState.toAuth()));
    };
  • The svix dependency is no longer needed when using the verifyWebhook() function. verifyWebhook() was refactored to not rely on svix anymore while keeping the same functionality and behavior.

    If you previously installed svix to use verifyWebhook() you can uninstall it now:

    npm uninstall svix

Patch Changes

  • Introduce getAuthObjectFromJwt as internal utility function that centralizes the logic for generating auth objects from session JWTs.

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.