Skip to content

ci(repo): Version packages #5466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025
Merged

ci(repo): Version packages #5466

merged 1 commit into from
Apr 3, 2025

Conversation

clerk-cookie
Copy link
Collaborator

@clerk-cookie clerk-cookie commented Mar 27, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@clerk/[email protected]

Minor Changes

  • Introduce a verifyWebhook() function to verify incoming Clerk webhook requests and process the payload. This function handles webhook signature verification using Svix and is now available across all backend and fullstack SDKs. (#5468) by @wobsoriano

    To get started, install svix, which Clerk uses to verify its webhooks:

    npm install svix

    Then in your webhook route handler, import verifyWebhook() from the Astro SDK:

    // pages/api/webhooks.ts
    import { verifyWebhook } from '@clerk/astro/webhooks';
    
    export const POST = ({ request }) => {
      try {
        const evt = await verifyWebhook(request);
    
        // Do something with payload
        const { id } = evt.data;
        const eventType = evt.type;
        console.log(`Received webhook with ID ${id} and event type of ${eventType}`);
        console.log('Webhook payload:', body);
    
        return new Response('Webhook received', { status: 200 });
      } catch (err) {
        console.error('Error: Could not verify webhook:', err);
        return new Response('Error: Verification error', {
          status: 400,
        });
      }
    };

    For more information on how to sync Clerk data to your app with webhooks, see our guide.

  • Redirect to tasks on auth.protect and auth.redirectToSignIn (#5440) by @LauraBeatris

Patch Changes

@clerk/[email protected]

Minor Changes

  • Expose retryAfter value on ClerkAPIResponseError for 429 responses. (#5480) by @dstaley

  • Introduce a verifyWebhook() function to verify incoming Clerk webhook requests and process the payload. This function handles webhook signature verification using Svix and is now available across all backend and fullstack SDKs. (#5468) by @wobsoriano

    To get started, install svix, which Clerk uses to verify its webhooks:

    npm install svix

    Then in your webhook route handler, import verifyWebhook() from the Backend SDK:

    // app/api/webhooks/route.ts
    import { verifyWebhook } from '@clerk/backend/webhooks';
    
    try {
      const evt = await verifyWebhook(req);
    
      // Do something with payload
      const { id } = evt.data;
      const eventType = evt.type;
      console.log(`Received webhook with ID ${id} and event type of ${eventType}`);
      console.log('Webhook payload:', body);
    } catch (err) {
      console.error('Error: Could not verify webhook:', err);
    }

    For more information on how to sync Clerk data to your app with webhooks, see our guide.

  • Redirect to tasks on auth.protect and auth.redirectToSignIn (#5440) by @LauraBeatris

Patch Changes

@clerk/[email protected]

Minor Changes

  • Improve session refresh logic. (#5397) by @panteliselef

    • Switched from interval-based polling to timeout-based polling, ensuring retries for a getToken() call complete before the next poll begins.
    • Clerk.handleUnauthenticated() now sets the session to null when a /client request returns a 500 status code, preventing infinite request loops.
    • Improved error handling: If the /client request fails during initialization, the poller stops, a dummy client is created, a manual request to /tokens is attempted, and polling resumes.
  • Expose retryAfter value on ClerkAPIResponseError for 429 responses. (#5480) by @dstaley

Patch Changes

@clerk/[email protected]

Minor Changes

  • Introduce a verifyWebhook() function to verify incoming Clerk webhook requests and process the payload. This function handles webhook signature verification using Svix and is now available across all backend and fullstack SDKs. (#5468) by @wobsoriano

    To get started, install svix, which Clerk uses to verify its webhooks:

    npm install svix

    Then in your webhook route handler, import verifyWebhook() from the Express SDK:

    import { verifyWebhook } from '@clerk/express/webhooks';
    
    app.post(
      '/api/webhooks',
      bodyParser.raw({ type: 'application/json' }),
    
      async (req, res) => {
        try {
          const evt = await verifyWebhook(req);
    
          // Do something with payload
          const { id } = evt.data;
          const eventType = evt.type;
          console.log(`Received webhook with ID ${id} and event type of ${eventType}`);
          console.log('Webhook payload:', body);
    
          return res.status(200).send('Webhook received');
        } catch (err) {
          console.log('Error: Could not verify webhook:', err.message);
          return res.status(400).send('Error: Verification error');
        }
      },
    );

    For more information on how to sync Clerk data to your app with webhooks, see our guide.

Patch Changes

@clerk/[email protected]

Minor Changes

  • Introduce a verifyWebhook() function to verify incoming Clerk webhook requests and process the payload. This function handles webhook signature verification using Svix and is now available across all backend and fullstack SDKs. (#5468) by @wobsoriano

    To get started, install svix, which Clerk uses to verify its webhooks:

    npm install svix

    Then in your webhook route handler, import verifyWebhook() from the Fastify SDK:

    import { verifyWebhook } from '@clerk/fastify/webhooks';
    
    fastify.post('/api/webhooks', async (request, reply) => {
      try {
        const evt = await verifyWebhook(request);
    
        // Do something with payload
        const { id } = evt.data;
        const eventType = evt.type;
        console.log(`Received webhook with ID ${id} and event type of ${eventType}`);
        console.log('Webhook payload:', evt.data);
    
        return reply.status(200).send('Webhook received');
      } catch (err) {
        console.log('Error: Could not verify webhook:', err);
        return reply.status(400).send('Error: Verification error');
      }
    });

    For more information on how to sync Clerk data to your app with webhooks, see our guide.

Patch Changes

@clerk/[email protected]

Minor Changes

  • Introduce a verifyWebhook() function to verify incoming Clerk webhook requests and process the payload. This function handles webhook signature verification using Svix and is now available across all backend and fullstack SDKs. (#5468) by @wobsoriano

    To get started, install svix, which Clerk uses to verify its webhooks:

    npm install svix

    Then in your webhook route handler, import verifyWebhook() from the Next.js SDK:

    // app/api/webhooks/route.ts
    import { verifyWebhook } from '@clerk/nextjs/webhooks';
    
    export async function POST(req: Request) {
      try {
        const evt = await verifyWebhook(req);
    
        // Do something with payload
        const { id } = evt.data;
        const eventType = evt.type;
        console.log(`Received webhook with ID ${id} and event type of ${eventType}`);
        console.log('Webhook payload:', body);
    
        return new Response('Webhook received', { status: 200 });
      } catch (err) {
        console.error('Error: Could not verify webhook:', err);
        return new Response('Error: Verification error', {
          status: 400,
        });
      }
    }

    For more information on how to sync Clerk data to your app with webhooks, see our guide.

  • Redirect to tasks on auth.protect and auth.redirectToSignIn (#5440) by @LauraBeatris

Patch Changes

@clerk/[email protected]

Minor Changes

  • Deprecate event.context.auth in favor of event.context.auth() as function (#5513) by @LauraBeatris

    export default clerkMiddleware((event) => {
    + const { userId } = event.context.auth()
    - const { userId } = event.context.auth
      const isAdminRoute = event.path.startsWith('/api/admin')
    
      if (!userId && isAdminRoute) {
        throw createError({
          statusCode: 401,
          statusMessage: 'Unauthorized: User not signed in',
        })
      }
    })
  • Introduce a verifyWebhook() function to verify incoming Clerk webhook requests and process the payload. This function handles webhook signature verification using Svix and is now available across all backend and fullstack SDKs. (#5468) by @wobsoriano

    To get started, install svix, which Clerk uses to verify its webhooks:

    npm install svix

    Then in your webhook route handler, import verifyWebhook() from the Nuxt SDK:

    // server/api/webhooks.post.ts
    import { verifyWebhook } from '@clerk/nuxt/webhooks';
    
    export default eventHandler(async event => {
      try {
        const evt = await verifyWebhook(event);
    
        // Do something with payload
        const { id } = evt.data;
        const eventType = evt.type;
        console.log(`Received webhook with ID ${id} and event type of ${eventType}`);
        console.log('Webhook payload:', body);
    
        return 'Webhook received';
      } catch (err) {
        console.error('Error: Could not verify webhook:', err);
        setResponseStatus(event, 400);
        return 'Error: Verification error';
      }
    });

    For more information on how to sync Clerk data to your app with webhooks, see our guide.

Patch Changes

@clerk/[email protected]

Minor Changes

  • Introduce a verifyWebhook() function to verify incoming Clerk webhook requests and process the payload. This function handles webhook signature verification using Svix and is now available across all backend and fullstack SDKs. (#5468) by @wobsoriano

    To get started, install svix, which Clerk uses to verify its webhooks:

    npm install svix

    Then in your webhook route handler, import verifyWebhook() from the React Router SDK:

    import { verifyWebhook } from '@clerk/react-router/webhooks';
    
    export const action = async ({ request }) => {
      try {
        const evt = await verifyWebhook(request);
    
        // Do something with payload
        const { id } = evt.data;
        const eventType = evt.type;
        console.log(`Received webhook with ID ${id} and event type of ${eventType}`);
        console.log('Webhook payload:', evt.data);
    
        return new Response('Webhook received', { status: 200 });
      } catch (err) {
        console.log('Error: Could not verify webhook:', err);
        return new Response('Error: Verification error', {
          status: 400,
        });
      }
    };

    For more information on how to sync Clerk data to your app with webhooks, see our guide.

Patch Changes

@clerk/[email protected]

Minor Changes

Patch Changes

@clerk/[email protected]

Minor Changes

  • Introduce a verifyWebhook() function to verify incoming Clerk webhook requests and process the payload. This function handles webhook signature verification using Svix and is now available across all backend and fullstack SDKs. (#5468) by @wobsoriano

    To get started, install svix, which Clerk uses to verify its webhooks:

    npm install svix

    Then in your webhook route handler, import verifyWebhook() from the TanStack React Start SDK:

    // pages/api/webhooks.ts
    import { verifyWebhook } from '@clerk/tanstack-react-start/webhooks';
    
    export const APIRoute = createAPIFileRoute('/api/webhooks')({
      POST: async ({ request }) => {
        try {
          const evt = await verifyWebhook(req);
    
          // Do something with payload
          const { id } = evt.data;
          const eventType = evt.type;
          console.log(`Received webhook with ID ${id} and event type of ${eventType}`);
          console.log('Webhook payload:', body);
    
          return new Response('Webhook received', { status: 200 });
        } catch (err) {
          console.error('Error: Could not verify webhook:', err);
          return new Response('Error: Verification error', {
            status: 400,
          });
        }
      },
    });

    For more information on how to sync Clerk data to your app with webhooks, see our guide.

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

Copy link

vercel bot commented Mar 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2025 1:00pm

@github-actions github-actions bot force-pushed the changeset-release/main branch from ace6eb2 to 87d3c57 Compare March 27, 2025 16:48
@github-actions github-actions bot force-pushed the changeset-release/main branch from 87d3c57 to 40ebcbd Compare March 27, 2025 17:01
@github-actions github-actions bot force-pushed the changeset-release/main branch from 40ebcbd to c13977a Compare March 27, 2025 20:46
@github-actions github-actions bot force-pushed the changeset-release/main branch from c13977a to 5823092 Compare March 28, 2025 00:45
@github-actions github-actions bot force-pushed the changeset-release/main branch from 5823092 to fd1e39e Compare March 28, 2025 12:23
@github-actions github-actions bot force-pushed the changeset-release/main branch from fd1e39e to 5e30aeb Compare March 28, 2025 12:52
@github-actions github-actions bot force-pushed the changeset-release/main branch from 5e30aeb to 734e716 Compare March 28, 2025 23:10
@github-actions github-actions bot force-pushed the changeset-release/main branch from 734e716 to 3ca2155 Compare March 30, 2025 20:47
@github-actions github-actions bot force-pushed the changeset-release/main branch from 3ca2155 to d29b238 Compare March 30, 2025 22:07
@github-actions github-actions bot force-pushed the changeset-release/main branch from d29b238 to 2ec9646 Compare March 30, 2025 22:15
@github-actions github-actions bot force-pushed the changeset-release/main branch from 2ec9646 to a74c462 Compare March 31, 2025 08:38
@github-actions github-actions bot force-pushed the changeset-release/main branch from a74c462 to c2984a2 Compare March 31, 2025 09:04
@github-actions github-actions bot force-pushed the changeset-release/main branch from c2984a2 to ff6897f Compare March 31, 2025 09:57
@github-actions github-actions bot force-pushed the changeset-release/main branch from cb56dfd to 994e7a6 Compare April 3, 2025 13:00
@anagstef anagstef closed this Apr 3, 2025
@anagstef anagstef reopened this Apr 3, 2025
@anagstef anagstef merged commit f95de07 into main Apr 3, 2025
30 checks passed
@anagstef anagstef deleted the changeset-release/main branch April 3, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants