Preparing for system design interviews?  Try bugzed.com →

Koa JWT Authentication Middleware

JSON →
library 1.0.3 ·javascript abandoned
verified Jun 17, 2026

koa-jwt2 is Koa middleware designed for authenticating HTTP requests using JSON Web Tokens (JWT). It validates incoming JWTs and populates `ctx.state.user` (or a configurable property) with the decoded payload, making it available for subsequent middleware to handle authorization and access control. Key features include support for `audience`, `issuer`, and `expiration` validation, handling of base64 URL-encoded secrets, and verification with public/private key pairs. It integrates `koa-unless` for specifying unprotected paths and offers advanced options like custom token extraction via `getToken` and multi-tenancy support through an asynchronous secret function. The current stable version is 1.0.3. However, the package's GitHub repository has been archived, indicating it is no longer actively maintained, and thus its release cadence is effectively ceased. This makes it distinct from more actively developed alternatives, though its multi-tenancy secret resolution feature remains notable.

total hits 21
actors 5 distinct systems
last hit 19d ago AhrefsBot
GPTBot
4
Amazonbot
4
ByteDance
3
Script
1
Humans
5

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · VN · BD