@nocobase/plugin-idp-oauth 2.2.0-beta.8 → 2.2.0-beta.9

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.
@@ -8,14 +8,14 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.2.0-beta.8",
11
+ "@nocobase/client": "2.2.0-beta.9",
12
12
  "antd": "5.24.2",
13
13
  "react": "18.2.0",
14
14
  "react-router-dom": "6.30.1",
15
- "@nocobase/flow-engine": "2.2.0-beta.8",
16
- "@nocobase/server": "2.2.0-beta.8",
17
- "@nocobase/cache": "2.2.0-beta.8",
18
- "@nocobase/plugin-auth": "2.2.0-beta.8",
19
- "@nocobase/utils": "2.2.0-beta.8",
20
- "@nocobase/database": "2.2.0-beta.8"
15
+ "@nocobase/flow-engine": "2.2.0-beta.9",
16
+ "@nocobase/server": "2.2.0-beta.9",
17
+ "@nocobase/cache": "2.2.0-beta.9",
18
+ "@nocobase/plugin-auth": "2.2.0-beta.9",
19
+ "@nocobase/utils": "2.2.0-beta.9",
20
+ "@nocobase/database": "2.2.0-beta.9"
21
21
  };
@@ -1 +1 @@
1
- {"name":"light-my-request","version":"6.6.0","description":"Fake HTTP injection library","main":"index.js","type":"commonjs","types":"types/index.d.ts","dependencies":{"cookie":"^1.0.1","process-warning":"^4.0.0","set-cookie-parser":"^2.6.0"},"devDependencies":{"@fastify/ajv-compiler":"^4.0.0","@fastify/pre-commit":"^2.1.0","@types/node":"^22.7.7","c8":"^10.1.2","end-of-stream":"^1.4.4","eslint":"^9.17.0","express":"^4.19.2","form-auto-content":"^3.2.1","form-data":"^4.0.0","formdata-node":"^6.0.3","multer":"^1.4.5-lts.1","neostandard":"^0.12.0","tinybench":"^3.0.0","tsd":"^0.31.0","undici":"^7.0.0"},"scripts":{"benchmark":"node benchmark/benchmark.js","coverage":"npm run unit -- --cov --coverage-report=html","lint":"eslint","lint:fix":"eslint --fix","test":"npm run lint && npm run test:unit && npm run test:typescript","test:typescript":"tsd","test:unit":"c8 --100 node --test"},"repository":{"type":"git","url":"git+https://github.com/fastify/light-my-request.git"},"keywords":["http","inject","fake","request","server"],"author":"Tomas Della Vedova - @delvedor (http://delved.org)","contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Manuel Spigolon","email":"behemoth89@gmail.com"},{"name":"Aras Abbasi","email":"aras.abbasi@gmail.com"},{"name":"Frazer Smith","email":"frazer.dev@icloud.com","url":"https://github.com/fdawgs"}],"license":"BSD-3-Clause","bugs":{"url":"https://github.com/fastify/light-my-request/issues"},"homepage":"https://github.com/fastify/light-my-request#readme","funding":[{"type":"github","url":"https://github.com/sponsors/fastify"},{"type":"opencollective","url":"https://opencollective.com/fastify"}],"_lastModified":"2026-06-29T01:53:47.387Z"}
1
+ {"name":"light-my-request","version":"6.6.0","description":"Fake HTTP injection library","main":"index.js","type":"commonjs","types":"types/index.d.ts","dependencies":{"cookie":"^1.0.1","process-warning":"^4.0.0","set-cookie-parser":"^2.6.0"},"devDependencies":{"@fastify/ajv-compiler":"^4.0.0","@fastify/pre-commit":"^2.1.0","@types/node":"^22.7.7","c8":"^10.1.2","end-of-stream":"^1.4.4","eslint":"^9.17.0","express":"^4.19.2","form-auto-content":"^3.2.1","form-data":"^4.0.0","formdata-node":"^6.0.3","multer":"^1.4.5-lts.1","neostandard":"^0.12.0","tinybench":"^3.0.0","tsd":"^0.31.0","undici":"^7.0.0"},"scripts":{"benchmark":"node benchmark/benchmark.js","coverage":"npm run unit -- --cov --coverage-report=html","lint":"eslint","lint:fix":"eslint --fix","test":"npm run lint && npm run test:unit && npm run test:typescript","test:typescript":"tsd","test:unit":"c8 --100 node --test"},"repository":{"type":"git","url":"git+https://github.com/fastify/light-my-request.git"},"keywords":["http","inject","fake","request","server"],"author":"Tomas Della Vedova - @delvedor (http://delved.org)","contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Manuel Spigolon","email":"behemoth89@gmail.com"},{"name":"Aras Abbasi","email":"aras.abbasi@gmail.com"},{"name":"Frazer Smith","email":"frazer.dev@icloud.com","url":"https://github.com/fdawgs"}],"license":"BSD-3-Clause","bugs":{"url":"https://github.com/fastify/light-my-request/issues"},"homepage":"https://github.com/fastify/light-my-request#readme","funding":[{"type":"github","url":"https://github.com/sponsors/fastify"},{"type":"opencollective","url":"https://opencollective.com/fastify"}],"_lastModified":"2026-07-06T02:55:35.977Z"}
@@ -1 +1 @@
1
- {"name":"ms","version":"2.1.3","description":"Tiny millisecond conversion utility","repository":"vercel/ms","main":"./index","files":["index.js"],"scripts":{"precommit":"lint-staged","lint":"eslint lib/* bin/*","test":"mocha tests.js"},"eslintConfig":{"extends":"eslint:recommended","env":{"node":true,"es6":true}},"lint-staged":{"*.js":["npm run lint","prettier --single-quote --write","git add"]},"license":"MIT","devDependencies":{"eslint":"4.18.2","expect.js":"0.3.1","husky":"0.14.3","lint-staged":"5.0.0","mocha":"4.0.1","prettier":"2.0.5"},"_lastModified":"2026-06-29T01:53:47.435Z"}
1
+ {"name":"ms","version":"2.1.3","description":"Tiny millisecond conversion utility","repository":"vercel/ms","main":"./index","files":["index.js"],"scripts":{"precommit":"lint-staged","lint":"eslint lib/* bin/*","test":"mocha tests.js"},"eslintConfig":{"extends":"eslint:recommended","env":{"node":true,"es6":true}},"lint-staged":{"*.js":["npm run lint","prettier --single-quote --write","git add"]},"license":"MIT","devDependencies":{"eslint":"4.18.2","expect.js":"0.3.1","husky":"0.14.3","lint-staged":"5.0.0","mocha":"4.0.1","prettier":"2.0.5"},"_lastModified":"2026-07-06T02:55:36.027Z"}
@@ -64,6 +64,14 @@ function getJoseModule() {
64
64
  }
65
65
  return joseModulePromise;
66
66
  }
67
+ function getHeaderValue(value) {
68
+ var _a;
69
+ const raw = Array.isArray(value) ? value[0] : value;
70
+ if (typeof raw !== "string") {
71
+ return void 0;
72
+ }
73
+ return ((_a = raw.split(",")[0]) == null ? void 0 : _a.trim()) || void 0;
74
+ }
67
75
  const defaultSupportedScopes = ["openid", "offline_access", "profile", "email"];
68
76
  const envJwksKeys = ["IDP_OAUTH_JWKS", "OAUTH_JWKS"];
69
77
  const MAX_CACHE_TTL_MS = 2147483647;
@@ -207,8 +215,8 @@ class IdpOauthService {
207
215
  }
208
216
  getOrigin(ctx) {
209
217
  var _a, _b;
210
- const protocol = ((_a = ctx.headers) == null ? void 0 : _a["x-forwarded-proto"]) || ctx.protocol || "http";
211
- const host = ((_b = ctx.headers) == null ? void 0 : _b["x-forwarded-host"]) || ctx.host || "";
218
+ const protocol = getHeaderValue((_a = ctx.headers) == null ? void 0 : _a["x-forwarded-proto"]) || ctx.protocol || "http";
219
+ const host = getHeaderValue((_b = ctx.headers) == null ? void 0 : _b["x-forwarded-host"]) || ctx.host || "";
212
220
  return process.env.APP_PUBLIC_ORIGIN || `${protocol}://${host}`;
213
221
  }
214
222
  getApiBasePath() {
@@ -515,7 +523,7 @@ class IdpOauthService {
515
523
  (_c = (_a = ctx.cookies) == null ? void 0 : _a.set) == null ? void 0 : _c.call(_a, provider.cookieName("session"), null, {
516
524
  httpOnly: true,
517
525
  sameSite: "lax",
518
- secure: (((_b = ctx.headers) == null ? void 0 : _b["x-forwarded-proto"]) || ctx.protocol) === "https"
526
+ secure: (getHeaderValue((_b = ctx.headers) == null ? void 0 : _b["x-forwarded-proto"]) || ctx.protocol) === "https"
519
527
  });
520
528
  }
521
529
  async resolveInteractionBridgeUser(ctx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-idp-oauth",
3
- "version": "2.2.0-beta.8",
3
+ "version": "2.2.0-beta.9",
4
4
  "main": "dist/server/index.js",
5
5
  "displayName": "IdP: OAuth",
6
6
  "displayName.zh-CN": "IdP: OAuth",
@@ -22,5 +22,5 @@
22
22
  "keywords": [
23
23
  "Authentication"
24
24
  ],
25
- "gitHead": "fa2502c1e9faf6d74b3f51b42dbc6546638d46af"
25
+ "gitHead": "60e3d7abbaa0c7cead76f71a4f3d5eedb6b8acdb"
26
26
  }