Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@brianmmdev/clerk-webhooks-handler

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brianmmdev/clerk-webhooks-handler

A package to streamline the configuration of Clerk webhooks in a Next.js application.

Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
240
-78.91%
Maintainers
1
Weekly downloads
 
Created
Source

Clerk Webhooks Handler

A package to streamline the configuration of Clerk webhooks in a Next.js application.

TODO: complete the readme 🤗

Getting started

Install the package:

npm install @brianmmdev/clerk-webhooks-handler

Create a route handler at your preferred location with the following code. Modify the events events inside the configuration passed into createWehbooksHandler to handle the various events sent from Clerk.

import { createWebhooksHandler } from "@brianmmdev/clerk-webhooks-handler";

const handler = createWebhooksHandler({
  // Add/remove optional handlers to get access to the data.
  onUserUpdated: async (payload) => {
    // Update a user in the database
    console.log("user updated!", payload)
  },
  onSessionCreated: async (payload) => {
    // Create a session in the database
    console.log("session created!", payload)
  }
})

export const POST = handler.POST

Watch this demo to learn more about how to use the package: https://f.io/XKnnF3cN

Please also ping me on Twitter with feedback: https://twitter.com/brianmmdev

FAQs

Package last updated on 02 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts