Clerk is the easiest way to add authentication and user management to your Fastify application. To gain a better understanding of the Clerk Backend API and SDK, refer to
the Node SDK and Backend API documentation.
Getting Started
To use this plugin you should first create a Clerk application and retrieve a Secret Key and a Publishable Key for you application (see here) to be used as environment variables CLERK_PUBLISHABLE_KEY & CLERK_SECRET_KEY.
Prerequisites
Node.js >=18.17.0 or later
Fastify v4+
Installation
npm install @clerk/fastify
Build
npm run build
Usage
Retrieve your Backend API key from the API Keys screen in your Clerk dashboard and set it as an environment variable in a .env file:
Support authenticated routes that the Clerk middleware will run as plugin in preHandler hook and unauthenticated routes that will not trigger the middleware using the Fastify docs.
The npm package @clerk/fastify receives a total of 33,661 weekly downloads. As such, @clerk/fastify popularity was classified as popular.
We found that @clerk/fastify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 7 open source maintainers collaborating on the project.
Package last updated on 07 Aug 2024
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.
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.