Fastify Basic Auth Middleware

JSON →
library 0.0.2 ·javascript
verified May 27, 2026

This package provides a plug-and-play HTTP Basic Authentication solution designed for use with the Fastify web framework. It supports checking credentials against static user lists or through custom synchronous or asynchronous authorizer functions. As of version 0.0.2, it emphasizes secure credential comparison with a `safeCompare` utility to prevent timing attacks. While its README initially showed Express.js examples, the package is explicitly built for Fastify. It ships with TypeScript types, ensuring type safety for Fastify applications. This plugin is distinct from the `@fastify/basic-auth` core plugin, offering a different API for integrating basic authentication.

total hits 16
actors 7 distinct systems
last hit 2d ago human
MetaBot
4
GPTBot
2
Script
1
Search engines
2
Humans
1

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇧🇷 Brazil · 🇩🇪 Germany