@clerk/backend
3.29.0 · 14 Nov 2026MIT8.4M / weekRepositoryHomepagenpmAtom feed
2.33.9 is the newest release of 2.x.
In short
3 new4 fixed2 internal
Security
2 advisories affect 2.1.0; 2.33.3 fixes them
- HighClerk has an authorization bypass when combining organization, billing, or reverification checksGHSA-w24r-5266-9c3c · 30 Apr 2026Fixed in 2.33.3
- High@clerk/backend Performs Insufficient Verification of Data AuthenticityGHSA-9mp4-77wg-rwx9 · 9 Jul 2025Fixed in 2.4.0
Release note
Minor Changes
Improve
subjectproperty handling for machine auth objects.Usage:
import { createClerkClient } from '@clerk/backend'; const clerkClient = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY, publishableKey: process.env.CLERK_PUBLISHABLE_KEY, }); const requestState = await clerkClient.authenticateRequest(request, { acceptsToken: 'any', }); const authObject = requestState.toAuth(); switch (authObject.tokenType) { case 'api_key': // authObject.userId // authObject.orgId break; case 'machine_token': // authObject.machineId break; case 'oauth_token': // authObject.userId // authObject.clientId break; }Respect
acceptsTokenwhen returning unauthenticated session or machine object.
Patch Changes
Re-organize internal types for the recently added "machine authentication" feature.
Fix calculation of handshake URL when proxy URL is set on the ClerkProvider
Add JSdoc comments for user methods.
Updating type of Verification.status
Resolve machine token property mixing in discriminated unions
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.