JSPM

@clerk/edge

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1117
  • Score
    100M100P100Q11237F
  • License MIT

Clerk.dev SDK for Edge/Serverless authentication

Package Exports

  • @clerk/edge
  • @clerk/edge/vercel-edge

Readme


Clerk Edge SDK

Clerk SDK for serverless and edge environments.

This package is a wrapper around Clerk core capabilities with added functionality and helpers aimed towards different edge and serverless platforms.

Usage

Installing the package:

npm install @clerk/edge
# or
yarn add @clerk/edge

Methods for supported platforms can be imported from the specific path:

import { withSession } from '@clerk/edge/vercel-edge';

async function handler(req, event) {
  // ...
}

export const middleware = withSession(handler);

Supported platforms

Currently supported environments/platforms:

Vercel Edge Functions

To use with Edge Functions :

import { withSession } from '@clerk/edge/vercel-edge';

async function handler(req, event) {
  // ...
}

export const middleware = withSession(handler);

Supported methods:

  • withSession
  • verifySessionToken
  • Resources API through ClerkAPI