finds.dev

jaredhanson/oauth2orize

OAuth 2.0 authorization server toolkit for Node.js.

View on GitHubHomepage ↗

★ 3,531JavaScriptMITupdated Apr 2024

// the take

A low-level toolkit for building an OAuth 2.0 authorization server on top of Express and Passport. It gives you middleware for the grant and token-exchange steps but leaves client/token storage and the authorization UI entirely up to you. Aimed at teams that need to run their own OAuth2 provider and are comfortable implementing the protocol's storage and session plumbing themselves.

Clean separation between issuing a grant (code.js, token.js) and exchanging it for an access token (authorizationCode.js, password.js, clientCredentials.js, refreshToken.js), so you only wire up the grant types you actually need. Storage is fully pluggable — every callback hands you raw client/code/token data and lets your app decide how to persist it, so it works with any DB. It's the de facto reference implementation many other OAuth2 Node libraries and tutorials still point to, with extension packages (oauth2orize-openid, oauth2orize-jwt-bearer) covering cases outside the core spec.

Badges in the README point to Travis CI and David-DM, both shut down years ago — the 2024 push is likely a minor fix, not active development, so don't expect fast turnaround on issues. Entirely callback-based (err, result) with no Promise or async/await support, which means wrapping every handler yourself if the rest of your stack is async. No PKCE support and no OIDC out of the box — PKCE is now recommended even for confidential clients, and you'd need the separate oauth2orize-openid module just to get ID tokens. Security-sensitive pieces like token revocation, refresh-token rotation, and rate limiting aren't provided — you're on your own for anything beyond the bare grant/exchange flow, which is a lot of surface area to get right in an auth server.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

search the same ground:

// at a glance

Stars
3,531
Forks
473
Language
JavaScript
License
MIT
Last commit
12 Apr 2024

// nearby

If oauth2orize isn't quite it.

All repos →