Repository navigation
Releases: awesome-lang-auth/awesome-node-auth
Releases · awesome-lang-auth/awesome-node-auth
Release list
Release v1.10.8
Changelog
- release: 1.10.8 (#35) (7e640b4)
- test: bind supertest servers to 127.0.0.1 (fixes intermittent 401 / Parse Error) (#34) (c04e61b)
- fix: decode route params once (follow-up to #29) (#32) (77cf58f)
- fix: issue #29 residuals (admin :id decode, 501 unsupported store, link prefix, hook error status, docs) (#30) (2ac6e72)
Release v1.10.7
v1.10.6
Release 1.10.6
Security
- Strictly require valid expiry (
exp) and signature (s) on OAuth callback structured state; reject stripped{n, o}and bare nonces. - Remove duplicate nonce cookie set on
Path=/in OAuth start routes.
Fixed
- Reset
lastIndex = 0before and after evaluating RegExp inallowedReturnPaths. - Treat empty
allowedReturnPaths: []as unset and fall through precedence.
Documentation
- Documented all 4 configuration locations for
allowedReturnPaths, their exact precedence, and query parameters matching behavior for string entries.
Release v1.10.5
Release v1.10.5
- fix: resolve issues #20, #21, #24 and update docs for #10 (#25)
- feat: added
onBeforeDeleteUserhook (DELETE /accountandDELETE /admin/api/users/:id) - fix: avoid 500 error on body-less POST/PATCH requests across auth, admin, and tools routes
- feat: server-side
sendVerificationEmailandPOST /admin/api/users/:id/send-verification-email - docs: explicit security notice on
node:vmboundary for inbound webhooks
Release v1.10.4
Release v1.10.4
Security & Enhancements (closes #22)
- OAuth start return_path validation and restriction:
- Strictly validates
req.query.return_pathon start endpoints (/oauth/google,/oauth/github,/oauth/:name):- Must start with a single
/(rejects protocol-relative//and absolute URLs). - Rejects backslashes (
\) and control characters ([\x00-\x1f\x7f]). - Enforces maximum length of 512 characters.
- Invalid syntax returns HTTP 400 (
OAUTH_RETURN_PATH_INVALID) immediately with no cookie set.
- Must start with a single
- Added
allowedReturnPaths?: (string | RegExp)[]option inAuthConfig['oauth']andRouterOptionsto restrict permitted redirect targets (e.g.['/oauth/done']).
- Strictly validates
- Cryptographic state binding and expiry:
- Structured OAuth state parameter now embeds
{ n, o, p, exp, s }whereexpis a 10-minute expiry timestamp andsis an HMAC-SHA256 signature binding the nonce, origin, return path, and expiry viaconfig.accessTokenSecret. - Callback endpoints verify state freshness (
Date.now() <= exp) and cryptographically verify the signature before token exchange. Tamperedpor expired state returns HTTP 400 (INVALID_OAUTH_STATE) without calling provider strategy callback. - Re-validate
return_pathagainst syntax andallowedReturnPathson callback.
- Structured OAuth state parameter now embeds
- Production origin allowlist enforcement:
- When origin allowlist (
allowedOrigins) is empty in production mode (NODE_ENV === 'production'), OAuth start endpoints refuse initiation with HTTP 500 (OAUTH_ORIGIN_ALLOWLIST_EMPTY) and no cookie is set. - Callbacks refuse to trust arbitrary origins from state when allowlist is empty in production.
- When origin allowlist (