Fix missing issuer

This commit is contained in:
Henry Mao 2025-06-24 04:41:26 +08:00 • committed by GitHub
commit da6ac79c1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -297,6 +297,8 @@ export async function discoverOAuthMetadata(
authorizationServerUrl: string | URL,
opts?: { protocolVersion?: string },
): Promise<OAuthMetadata | undefined> {
const issuer = new URL(authorizationServerUrl);
const wellKnownPath = `/.well-known/oauth-authorization-server${issuer.pathname}`;
const url = new URL(wellKnownPath, authorizationServerUrl);