Minor Changes
-
#253
f4e026cThanks @mattzcarey! - Reject authorization-code requests from public clients that omit PKCE. OAuth 2.1 requires authorization servers to enforcecode_challengefor clients that cannot authenticate at the token endpoint. -
#248
194154eThanks @ksinder! - Report CIMD metadata fetch failures instead of treating them as unknown clients.
A failed Client ID Metadata Document fetch previously became anullclient
lookup, so a network problem (timeout, WAF block, upstream outage) was
indistinguishable from an unregistered client — at the token endpoint, in the
onErrorhook, and forOAuthHelperscallers. The fetch failure now throws a
new exportedCimdFetchErrorcarrying the metadata URL, stable
metadata_resolution_failedreason, and underlying diagnostic detail. The
token endpoint still returns the same genericinvalid_client/ "Client not
found" response, but reports the failure through theonErrorhook's
internalfield (categoryclient-id-metadata-document) together with a new
optionalrequestfield. Breaking for callers ofOAuthHelpers.lookupClient
(and methods built on it) that relied onnullfor CIMD fetch failures: catch
CimdFetchErrorto restore the old behavior. -
#259
71ec864Thanks @mattzcarey! - Enable RFC 9207 authorization response issuer identification. Authorization server metadata advertises support, parsed requests carry the expected issuer for application-owned terminal error responses, and successful code and implicit redirects includeiss. -
#255
5cc336cThanks @mattzcarey! - Validate protected resource metadata at construction time. Reject empty or invalid authorization server issuer lists, invalid resource and scope values, and bearer presentation methods the provider does not implement instead of publishing unusable or misleading RFC 9728 metadata. -
#277
9e88aa4Thanks @mattzcarey! - Require S256 PKCE by default. Authorization servers now advertise onlyS256and reject PKCE challenges that useplainor omitcode_challenge_methodunlessallowPlainPKCE: trueis configured for legacy compatibility. Confidential clients may continue to omit PKCE entirely. -
#260
248a9e7Thanks @mattzcarey! - Separate authorization-server and protected-resource scope configuration. ExplicitresourceMetadata.scopes_supportedvalues become baseline Bearer challenge guidance, operation-specificrequiredScopestakes precedence, andoffline_accessis omitted from provider-generated resource-facing scope lists. Deployments relying on the oldscopesSupportedfallback must configure protected-resource scopes explicitly. -
#251
98d642fThanks @mattzcarey! - Add an exportedExternalTokenErrorfor intentional structured errors fromresolveExternalToken. Existing callbacks keep their previous behavior: returning{ props, audience? }authenticates, returningnullreturns a generic401 invalid_token, and every other thrown value, includingOAuthError, propagates as an unexpected failure. Standard bearer-tokenExternalTokenErrorfailures receiveWWW-Authenticatechallenges,requiredScopessupplies step-up guidance, callback headers are preserved, and browser clients can readWWW-AuthenticateandRetry-Afterthrough CORS. -
#256
510b20cThanks @mattzcarey! - UseresourceMetadata.resourceas the strict RFC 8707 resource policy. Configured deployments now require that exact resource throughout authorization, token issuance, and access-token validation. Unconfigured deployments remain interoperable by inheriting requested resources and defaulting omitted authorization resources to the request origin. -
#273
cd5e96aThanks @mattzcarey! - Validate configured scopes and registered OAuth client capabilities. Dynamic registration now applies RFC 7591 defaults, rejects unsupported or inconsistent authentication, grant, and response types before storage, and applies the same capability checks to CIMD metadata.
Patch Changes
-
#254
79270daThanks @mattzcarey! - Tighten Client ID Metadata Document validation by requiring a non-emptyclient_nameand accepting only the currently implemented public-client authentication method,none. Support OpenID RP Metadata Choices by selectingnonefromtoken_endpoint_auth_methods_supported, including ChatGPT-style documents that also advertiseprivate_key_jwt. -
#273
cd5e96aThanks @mattzcarey! - Fail closed when ID-JAG assertions contain unsupportedauthorization_detailsorcnfauthorization constraints. These claims now produce a genericinvalid_grantresponse before replay reservation, mapping, or token storage. -
#258
8883c0aThanks @mattzcarey! - Validate refresh-tokenresourceparameters before invoking callbacks, rotating refresh tokens, or writing grant state. Invalid or out-of-grant resource requests now returninvalid_targetwithout mutating the authorization grant. -
#247
9d045d2Thanks @agent-think! - Return RFC-compliant401 invalid_clientresponses for malformed HTTP Basic client credentials, recognize the Basic scheme case-insensitively, and include the required Basic challenge on authentication failures. -
#252
fdba134Thanks @mattzcarey! - Return a bare RFC 6750 bearer challenge when protected resource requests omit credentials or use an unsupported authorization scheme. These responses no longer mislabel absent credentials asinvalid_tokenor include OAuth error details. -
#273
cd5e96aThanks @mattzcarey! - Require ID-JAG assertions to identify exactly one authorization server audience. Multi-element, duplicate, empty, malformed, and mismatched audience arrays are now rejected before authorization state is written. -
#275
ee5b487Thanks @mattzcarey! - Reject unsupported PKCEcode_challenge_methodvalues instead of treating them asplain. Discovery and request validation now share one PKCE capability policy,completeAuthorization()revalidates reconstructed requests, and token exchange fails closed for malformed grants created by older versions. -
#276
94cc3dbThanks @agent-think! - Enforce each client's registeredtoken_endpoint_auth_methodwhen authenticating token and revocation endpoint requests. -
#271
0fa9bd5Thanks @mattzcarey! - Replace internalenv: anyparameters with typed shapes. Internal provider methods now takeEnv & ProviderEnv(whereProviderEnvdeclares the requiredOAUTH_KV: KVNamespacebinding),ResolveExternalTokenInputthreads theEnvgeneric through to theresolveExternalTokencallback, andOAuthHelpersImplis generic overEnv. No runtime behavior change. -
#273
cd5e96aThanks @mattzcarey! - Validate authorization response types in bothparseAuthRequest()andcompleteAuthorization(). Missing, unsupported, and client-disallowed values are rejected after client and redirect URI validation but before grant creation or existing-grant revocation.