Koa Bearer Token Middleware

JSON →
library 2.0.2 ·javascript maintenance
verified May 27, 2026

koa-bearer-token is a middleware for Koa.js that parses bearer tokens from incoming requests, adhering to RFC6750. It extracts tokens from the `Authorization: Bearer <token>` header, `access_token` query parameter, or `access_token` in the request body. Since version 2.0.0, it also supports extracting tokens from signed or unsigned cookies. The current stable version is 2.0.2, released in August 2021, suggesting a maintenance or slow-cadence release schedule. Key differentiators include its strict RFC6750 compliance, extensive configurability for token keys and locations, and built-in TypeScript support. It integrates seamlessly with Koa applications, making it straightforward to secure API endpoints with OAuth2 bearer tokens. It requires Node.js version 12 or higher.

total hits 35
actors 8 distinct systems
last hit 1d ago human
Amazonbot
4
MetaBot
4
GPTBot
2
Script
1
Search engines
2
Humans
2

top countries 🇨🇦 Canada · 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇬🇧 United Kingdom