@openid4vc/oauth2 0.3.0-alpha-20250321132043 → 0.3.0-alpha-20250321142414

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -615,7 +615,6 @@ async function fetchAuthorizationServerMetadata(issuer, fetch) {
615
615
  wellKnownAuthorizationServerSuffix,
616
616
  parsedIssuerUrl.pathname
617
617
  ]);
618
- const nonCompliantAuthorizationServerWellKnownMetadataUrl = joinUriParts(issuer, [wellKnownAuthorizationServerSuffix]);
619
618
  const authorizationServerResult = await fetchWellKnownMetadata(
620
619
  authorizationServerWellKnownMetadataUrl,
621
620
  zAuthorizationServerMetadata,
@@ -629,11 +628,12 @@ async function fetchAuthorizationServerMetadata(issuer, fetch) {
629
628
  }
630
629
  return authorizationServerResult;
631
630
  }
632
- const alternativeAuthorizationServerResult = await fetchWellKnownMetadata(
631
+ const nonCompliantAuthorizationServerWellKnownMetadataUrl = joinUriParts(issuer, [wellKnownAuthorizationServerSuffix]);
632
+ const alternativeAuthorizationServerResult = nonCompliantAuthorizationServerWellKnownMetadataUrl !== authorizationServerWellKnownMetadataUrl ? await fetchWellKnownMetadata(
633
633
  nonCompliantAuthorizationServerWellKnownMetadataUrl,
634
634
  zAuthorizationServerMetadata,
635
635
  fetch
636
- );
636
+ ) : void 0;
637
637
  if (alternativeAuthorizationServerResult) {
638
638
  if (alternativeAuthorizationServerResult.issuer !== issuer) {
639
639
  throw new Oauth2Error(