Retain URL search parameter
This commit is contained in:
parent
c5fcba4617
commit
7b02c5cda3
1 changed files with 2 additions and 0 deletions
|
|
@ -263,6 +263,7 @@ export async function discoverOAuthProtectedResourceMetadata(
|
|||
} else {
|
||||
const issuer = new URL(serverUrl);
|
||||
const wellKnownPath = buildWellKnownPath('oauth-protected-resource', issuer.pathname);
|
||||
wellKnownPath.search = issuer.search;
|
||||
url = new URL(wellKnownPath, issuer);
|
||||
}
|
||||
|
||||
|
|
@ -365,6 +366,7 @@ export async function discoverOAuthMetadata(
|
|||
// Try path-aware discovery first (RFC 8414 compliant)
|
||||
const wellKnownPath = buildWellKnownPath('oauth-authorization-server', issuer.pathname);
|
||||
const pathAwareUrl = new URL(wellKnownPath, issuer);
|
||||
pathAwareUrl.search = issuer.search;
|
||||
let response = await tryMetadataDiscovery(pathAwareUrl, protocolVersion);
|
||||
|
||||
// If path-aware discovery fails with 404, try fallback to root discovery
|
||||
|
|
|
|||
Loading…
Reference in a new issue