github clerk/javascript @clerk/react-router@1.5.0

latest releases: @clerk/types@4.92.0, @clerk/clerk-js@5.99.0, @clerk/fastify@2.4.37...
5 months ago

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. (#5689) by @wobsoriano

    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. (#6059) by @royanger

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

    npm uninstall svix

Patch Changes

  • In this release the TypeScript types for rootAuthLoader(), getAuth(), and <ClerkProvider> were adjusted but should still work as before. Previously, these types relied on internal, unstable React Router types that changed in their recent 7.6.1 release. We simplified our TypeScript types and no longer rely on internal exports from React Router. (#6019) by @LekoArts

  • Updated dependencies [ea622ba, d8fa5d9, be2e89c, c656270, 5644d94, a3232c7, b578225, 918e2e0, 795d09a, 4f93634, 8838120]:

    • @clerk/backend@2.0.0
    • @clerk/types@4.60.0
    • @clerk/clerk-react@5.31.9
    • @clerk/shared@3.9.6

Don't miss a new javascript release

NewReleases is sending notifications on new releases.