@smithery/sdk 1.6.6 → 1.6.7

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.
@@ -32,7 +32,7 @@ export function createIdentityTokenRouter(options) {
32
32
  return;
33
33
  }
34
34
  const host = req.get("host") ?? "localhost";
35
- const audience = `${req.protocol}://${host}${tokenPath}`;
35
+ const audience = `https://${host}${tokenPath}`;
36
36
  const { payload } = await jwtVerify(assertion, JWKS, {
37
37
  issuer,
38
38
  audience,
@@ -74,7 +74,7 @@ export function mountOAuth(app, opts) {
74
74
  // Identity-only: explicitly mount protected resource metadata endpoint
75
75
  app.use("/.well-known/oauth-protected-resource", (req, res, next) => {
76
76
  const host = req.get("host") ?? "localhost";
77
- const issuerUrl = new URL(`${req.protocol}://${host}`);
77
+ const issuerUrl = new URL(`https://${host}`);
78
78
  const protectedResourceMetadata = {
79
79
  resource: new URL("/mcp", issuerUrl).href,
80
80
  authorization_servers: [issuerUrl.href],
@@ -84,7 +84,7 @@ export function mountOAuth(app, opts) {
84
84
  // Identity-only: also advertise minimal AS metadata for discovery per RFC 8414
85
85
  app.use("/.well-known/oauth-authorization-server", (req, res, next) => {
86
86
  const host = req.get("host") ?? "localhost";
87
- const issuerUrl = new URL(`${req.protocol}://${host}`);
87
+ const issuerUrl = new URL(`https://${host}`);
88
88
  const oauthMetadata = {
89
89
  issuer: issuerUrl.href,
90
90
  token_endpoint: new URL(`${basePath}token`, issuerUrl).href,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithery/sdk",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "description": "SDK to develop with Smithery",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",