Preparing for system design interviews?  Try bugzed.com →

Fetch Middleware for OAuth2

JSON →
library 1.0.2 ·javascript maintenance
verified Jun 17, 2026

fetch-mw-oauth2 is a JavaScript library designed to simplify OAuth2 integration with the standard `fetch` API, handling automatic token acquisition and refreshing. Currently at v3.3.1, it supports `authorization_code`, `password`, and `client_credentials` grant types, offers robust error handling, OpenID Connect `id_token` exposure, and includes support for token revocation (RFC 7009) and the `resource` parameter (RFC 8707). Since its v3.0.0 release, the library is ESM-only and has ceased support for Node.js 14 and 16. It primarily functions as a `fetch` wrapper or middleware. This package is in maintenance mode, as development has shifted to its successor, `@badgateway/oauth2-client`, which offers enhanced features and similar functionality.

total hits 17
actors 5 distinct systems
last hit 17d ago AhrefsBot
GPTBot
4
Script
1
ByteDance
1
Search engines
1
Humans
6

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇨🇳 China · 🇸🇬 Singapore · 🇩🇪 Germany