v5.0.0-rc.0
Pre-release
Pre-release
·
48 commits
to main
since this release
This release adds OpenID Connect support and includes two breaking changes.
Breaking
- Require Node.js 22.
- The implicit grant now returns tokens in the URL fragment instead of the query string, as recommended by RFC 6749. Set
implicitRedirectModeback to"query"to keep the old behavior:new AuthorizationServer(clientRepository, tokenRepository, scopeRepository, jwtService, { implicitRedirectMode: "query", });
Improvements
- Add OpenID Connect support for the authorization code flow. Opt in with a top-level
issuerand anoidcblock backed by an RS256JwtService. You get a signedid_tokenalongside the access token, theuserInfo(),openidConfiguration(), andjwks()endpoints, andgetUserClaims/getIdTokenClaimshooks to shape claims. - Add an RS256
JwtServicewith JWKS export and RFC 7638 thumbprintkiddefaults. JwtService.verify()now pins its algorithm and rejects non-object payloads. Only affects direct callers.
This is a pre-release: npm install @jmondi/oauth2-server@next. OIDC is RS256-only, issues id_token on the authorization code flow only, and returns plain-JSON UserInfo.