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/edgeMethods 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:
withSessionverifySessionToken- Resources API through
ClerkAPI