Express Bearer Token Middleware

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

express-bearer-token is an Express middleware for extracting RFC6750-compliant OAuth 2.0 bearer tokens from incoming HTTP requests. It attempts to locate a token in the 'Authorization: Bearer <token>' header, the 'access_token' field in the request body, or 'access_token' in query parameters. Optionally, it can also extract tokens from cookies. If found, the token is made available on `req.token`. Crucially, if multiple token sources are present, the middleware strictly adheres to RFC6750 by immediately aborting the request with an HTTP 400 status code. The package is currently at version 3.0.0 and ships with TypeScript types. Its release cadence appears to be slow, with the last major release two years ago, suggesting a mature, maintenance-focused project rather than active feature development.

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

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