@lifeaitools/clauth 1.5.21 → 1.5.22

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.
@@ -2894,12 +2894,17 @@ function createServer(initPassword, whitelist, port, tunnelHostnameInit = null,
2894
2894
 
2895
2895
  // ── OAuth Discovery (RFC 9728 + RFC 8414) ──────────────
2896
2896
  // claude.ai probes these for ALL remote MCP connections.
2897
- // resource MUST match the connector URL configured in claude.ai (/sse).
2897
+ // resource MUST match the connector URL configured in claude.ai.
2898
+ // /.well-known/oauth-protected-resource/gws → resource=/gws
2899
+ // /.well-known/oauth-protected-resource/sse → resource=/sse
2900
+ // /.well-known/oauth-protected-resource → resource=/sse (default)
2898
2901
  if (reqPath.startsWith("/.well-known/oauth-protected-resource")) {
2899
2902
  const base = oauthBase();
2903
+ const suffix = reqPath.replace("/.well-known/oauth-protected-resource", "").replace(/^\//, "");
2904
+ const resourcePath = suffix && ["/gws", "/clauth", "/mcp", "/sse"].includes("/" + suffix) ? "/" + suffix : "/sse";
2900
2905
  res.writeHead(200, { "Content-Type": "application/json", ...CORS });
2901
2906
  return res.end(JSON.stringify({
2902
- resource: `${base}/sse`,
2907
+ resource: `${base}${resourcePath}`,
2903
2908
  authorization_servers: [base],
2904
2909
  scopes_supported: ["mcp:tools"],
2905
2910
  bearer_methods_supported: ["header"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/clauth",
3
- "version": "1.5.21",
3
+ "version": "1.5.22",
4
4
  "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
5
  "type": "module",
6
6
  "bin": {