@clerk/fastify
3.1.100 · 14 Nov 2026MIT154.4k / weekRepositoryHomepagenpmAtom feed
2.6.37 is the newest release of 2.x.
In short
1 new3 internal
Security
2 advisories affect 2.4.0; 2.6.31 fixes them
- HighClerk has an authorization bypass when combining organization, billing, or reverification checksGHSA-w24r-5266-9c3c · 30 Apr 2026Fixed in 2.6.31
- High@clerk/backend Performs Insufficient Verification of Data AuthenticityGHSA-9mp4-77wg-rwx9 · 9 Jul 2025Fixed in 2.4.4
Release note
Minor Changes
Introduces machine authentication, supporting four token types:
api_key,oauth_token,machine_token, andsession_token. For backwards compatibility,session_tokenremains the default when no token type is specified. This enables machine-to-machine authentication and use cases such as API keys and OAuth integrations. Existing applications continue to work without modification.You can specify which token types are allowed by using the
acceptsTokenoption in thegetAuth()function. This option can be set to a specific type, an array of types, or'any'to accept all supported tokens.Example usage:
import Fastify from 'fastify'; import { getAuth } from '@clerk/fastify'; const fastify = Fastify(); fastify.get('/path', (request, reply) => { const authObject = getAuth(req, { acceptsToken: 'any' }); if (authObject.tokenType === 'session_token') { console.log('this is session token from a user'); } else { console.log('this is some other type of machine token'); console.log('more specifically, a ' + authObject.tokenType); } });
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.