Changelog - 2026-11-07
The token audience is optional
Behavior ChangeIn one line. claims.issuer stays required, and claims.audience is optional now. A token service without an audience stamps no aud and checks none, as before the claims option; with one, it works as it did.
What changed
claims.issueris required. It is stamped asisson every token IGNIS signs and required on every token it verifies, so a token signed with the same key for another purpose is still refused.claims.audienceis optional. Absent, nothing is stamped andaudis not checked: a token with or without one verifies.- A present audience is checked at boot. It must be a non-empty string or a non-empty list of non-empty strings.
null, an empty or blank string, an empty list and a list with a non-string refuse the boot, namingclaims.audience.audience: undefinedcounts as absent. - Where. The JWS token service, the JWKS issuer and the JWKS verifier.
- Per-token audience.
generate({ claims: { audience } })still stamps one token with its own audience, with or without a configured one. - Unchanged.
claimsacceptsissuerandaudienceonly, the algorithm pin andverify.algorithmsfor a JWKS verifier stay, and a service assertion keeps its ownissandaud.
Who is affected
- Applications that set both
issuerandaudience. No action needed. - Applications that wanted to keep tokens without an
audworking. Leaveaudienceout. Tokens from before the claims option have noisseither, so they still need the issuer to match. - Everyone else. No action needed.
Configuration
Without an audience:
typescript
claims: { issuer: 'my-api' }
// signs { iss: 'my-api' }; verifies iss === 'my-api'; aud is neither stamped nor checkedWith an audience:
typescript
claims: { issuer: 'my-api', audience: 'inventory' }
// signs { iss: 'my-api', aud: 'inventory' }; verifies both, and refuses a token with another or no audDetails
| File | Package |
|---|---|
src/base/auth/authenticate/common/types/jwt.ts | kernel |
src/components/auth/authenticate/services/bearer/abstract.service.ts | core |