fix: stop pulling node:dns into client bundle via OAuth discovery

This commit is contained in:
Linus Rath
2026-05-18 19:31:38 +02:00
parent 43ac0725ce
commit ecd0467ffa
5 changed files with 54 additions and 37 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ async function tryTokenRequest(
async function findTokenEndpoint(serverUrl: string): Promise<string | null> {
// 1. Try OAuth discovery
const metadata = await discoverOAuth(serverUrl);
const metadata = await discoverOAuth(serverUrl, { validateEndpoint: isPublicHttpUrl });
if (metadata?.token_endpoint) return metadata.token_endpoint;
// 2. Try common Stalwart token endpoint paths directly