Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@clerk/edge
Advanced tools
This package has been deprecated in favor of the isomorphic @clerk/backend
which is now used across all server-enabled Clerk packages. This package will not receive any future updates. It should not be used directly - please use as a reference only.
This package is a wrapper around Clerk core capabilities with added functionality and helpers aimed towards different edge and serverless platforms.
npm install @clerk/edge
To build the package locally with the TypeScript compiler, run:
npm run build
Currently supported environments/platforms:
To use with Edge Functions:
import { withAuth } from '@clerk/edge/vercel-edge';
async function handler(req, event) {
// ...
}
export const middleware = withAuth(handler);
Supported methods:
withAuth
verifySessionToken
ClerkAPI
Clerk's JWT session token, contains the azp
claim, which equals the Origin of the request during token generation. You can provide the middlewares with a list of whitelisted origins to verify against, to protect your application of the subdomain cookie leaking attack.
Example implementation:
import { withAuth } from '@clerk/edge/vercel-edge';
const authorizedParties = ['http://localhost:3000', 'https://example.com'];
async function handler(req, event) {
// ...
}
export const middleware = withAuth(handler, { authorizedParties });
For further details and examples, please refer to our Documentation.
You can get in touch with us in any of the following ways:
We're open to all community contributions! If you'd like to contribute in any way, please read our contribution guidelines.
@clerk/edge
follows good practices of security, but 100% security cannot be assured.
@clerk/edge
is provided "as is" without any warranty. Use at your own risk.
For more information and to report security issues, please refer to our security documentation.
This project is licensed under the MIT license.
See LICENSE for more information.
FAQs
Clerk SDK for serverless and edge environments
We found that @clerk/edge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.