-
Notifications
You must be signed in to change notification settings - Fork 1
Release notes
Eugene Lazutkin edited this page Jul 17, 2026
·
2 revisions
Detailed per-version history. The README carries the one-line summaries.
Breaking reshape — the package became the web-app glue over AWS's official verifier:
-
Verification delegated to aws-jwt-verify (
^5.2.1), the single runtime dependency (itself dependency-free). The 1.x homegrown verification stack (jsonwebtoken-era code and its 2.x zero-dependency rewrite) is gone.CognitoJwtVerifier/JwtVerifierare re-exported from the package root. -
makeGetUser(verifier, options?)replacesmakeGetUser(pools, options?): build the verifier yourself (CognitoJwtVerifier.create({userPoolId, clientId, tokenUse})) and hand it over. An absent token resolvesnulland never throws; verification failures resolvenullor, underthrowOnError, throw aws-jwt-verify error classes.prime()maps to the verifier'shydrate(). -
Middlewares absorbed as subpaths — the sister packages
koa-cognito-middlewareandcognito-express-middlewaremoved in ascognito-toolkit/koaandcognito-toolkit/express; the standalone packages are frozen re-export thunks (their 2.0.0).makeAuth(options)returns a per-instance bundle —getUser,isAuthenticated,hasGroup,hasScope,isAllowed,setAuthCookie,stateUserProperty— replacing the former module-level statics. -
Auth-cookie fix: the cookie
domaindefaults to the request hostname — the oldhostdefault broke on Express 5, which keeps the port onreq.host(the cookie serializer rejects it). - Guards read Cognito's
cognito:groupsand OAuth2scopeclaims; 401 for anonymous, 403 for authenticated-but-unauthorized. Tokens are used bare (noBearerstripping — use a customsourceto strip). - Token utilities (
utils/lazy-access-token,utils/renewable-access-token) are unchanged from 2.x. - Migration guides: from the v1 middlewares and from cognito-toolkit 1.x.
Zero-dependency, ESM-only rewrite of the 1.x verifier on Node built-ins (crypto + fetch): configurable algorithm policy, audience / tokenUse / validate checks, typed CognitoAuthError, per-issuer JWKS with rotation refresh. Never published — the survey found AWS's aws-jwt-verify at parity-plus, which led directly to the 3.0.0 delegation.
- 1.0.6 — updated dependencies.
- 1.0.5 — updated dependencies.
- 1.0.4 — updated dependencies.
- 1.0.3 — updated dependencies.
- 1.0.2 — updated dependencies.
- 1.0.1 — added support for multiple pools.
-
1.0.0 — the initial public release (CommonJS,
jsonwebtoken+jwk-to-pem).
Start here
Reference
Under the hood