@camstack/addon-auth 1.2.139 → 1.2.141

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.
@@ -13751,7 +13751,14 @@ var BrokerProviderInfoSchema = object({
13751
13751
  /** Broker kinds this provider can create, with a display label. */
13752
13752
  kinds: array(object({
13753
13753
  kind: string(),
13754
- label: string()
13754
+ label: string(),
13755
+ /**
13756
+ * Relative hub path to start an interactive account link (OAuth popup).
13757
+ * May include `{{brokerId}}`; admin-ui substitutes and appends `?popup=1`.
13758
+ */
13759
+ interactiveConnectPath: string().min(1).optional(),
13760
+ /** Relative hub path to disconnect the linked account (same popup pattern). */
13761
+ interactiveDisconnectPath: string().min(1).optional()
13755
13762
  }))
13756
13763
  });
13757
13764
  var ListInputSchema = object({
@@ -13717,7 +13717,14 @@ var BrokerProviderInfoSchema = object({
13717
13717
  /** Broker kinds this provider can create, with a display label. */
13718
13718
  kinds: array(object({
13719
13719
  kind: string(),
13720
- label: string()
13720
+ label: string(),
13721
+ /**
13722
+ * Relative hub path to start an interactive account link (OAuth popup).
13723
+ * May include `{{brokerId}}`; admin-ui substitutes and appends `?popup=1`.
13724
+ */
13725
+ interactiveConnectPath: string().min(1).optional(),
13726
+ /** Relative hub path to disconnect the linked account (same popup pattern). */
13727
+ interactiveDisconnectPath: string().min(1).optional()
13721
13728
  }))
13722
13729
  });
13723
13730
  var ListInputSchema = object({
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-CiG_dP05.js");
5
+ const require_dist = require("../dist-CBTStyBW.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  node_crypto = require_dist.__toESM(node_crypto);
8
8
  //#region ../../node_modules/jose/dist/webapi/lib/buffer_utils.js
@@ -709,6 +709,7 @@ var DEFAULT_OIDC_ICON = "shield-check";
709
709
  var OIDC_CONNECTION_FORM_SCHEMA = { sections: [{
710
710
  id: "identity",
711
711
  title: "Identity",
712
+ columns: 2,
712
713
  fields: [{
713
714
  type: "text",
714
715
  key: "displayName",
@@ -725,6 +726,7 @@ var OIDC_CONNECTION_FORM_SCHEMA = { sections: [{
725
726
  }, {
726
727
  id: "idp",
727
728
  title: "Identity provider",
729
+ columns: 2,
728
730
  fields: [
729
731
  {
730
732
  type: "text",
@@ -1154,10 +1156,13 @@ var AuthOidcAddon = class extends require_dist.BaseAddon {
1154
1156
  },
1155
1157
  deleteConnection: async (input) => {
1156
1158
  if (findOidcProvider(this.config, input.id) === null) throw new Error(`Unknown OIDC connection "${input.id}"`);
1159
+ await this.updateGlobalSettings({ providers: this.config.providers.map((p) => p.id === input.id ? {
1160
+ ...p,
1161
+ clientSecret: require_dist.SECRET_CLEAR
1162
+ } : p) });
1157
1163
  const result = deleteOidcConnection(this.config, input.id);
1158
1164
  if (!result.ok) throw new Error(`Unknown OIDC connection "${input.id}"`);
1159
1165
  await this.updateGlobalSettings(result.config);
1160
- await this.clearSecrets([`providers[${input.id}].clientSecret`]);
1161
1166
  this.rebuildInstances();
1162
1167
  return { ok: true };
1163
1168
  }
@@ -1358,6 +1363,8 @@ var AuthOidcAddon = class extends require_dist.BaseAddon {
1358
1363
  const inst = this.instances.get(providerId);
1359
1364
  if (!inst) throw new Error(`OIDC: provider "${providerId}" no longer configured`);
1360
1365
  const doc = await this.getDiscovery(providerId);
1366
+ const clientSecret = inst.config.clientSecret;
1367
+ if (typeof clientSecret !== "string" || clientSecret.length === 0) throw new Error(`OIDC: client secret for "${providerId}" is unavailable`);
1361
1368
  const tokenRes = await fetch(doc.token_endpoint, {
1362
1369
  method: "POST",
1363
1370
  headers: {
@@ -1369,7 +1376,7 @@ var AuthOidcAddon = class extends require_dist.BaseAddon {
1369
1376
  code,
1370
1377
  redirect_uri: pending.redirectUri,
1371
1378
  client_id: inst.config.clientId,
1372
- client_secret: inst.config.clientSecret,
1379
+ client_secret: clientSecret,
1373
1380
  code_verifier: pending.codeVerifier
1374
1381
  })
1375
1382
  });
@@ -1,4 +1,4 @@
1
- import { _ as toSecretFieldView, a as buildAddonRouteProvider, c as oidcConnectionsCapability, d as BaseAddon, f as SECRET_CLEAR, g as isSecretMarker, h as isSecretClear, i as authProviderCapability, m as globalSecretScope, n as addonRoutesCapability, o as isDisplayIconKey, p as arrayItemFieldPath, s as loginMethodCapability, t as SSO_STATE_COOKIE, u as errMsg } from "../dist-BOK-Ox5c.mjs";
1
+ import { _ as toSecretFieldView, a as buildAddonRouteProvider, c as oidcConnectionsCapability, d as BaseAddon, f as SECRET_CLEAR, g as isSecretMarker, h as isSecretClear, i as authProviderCapability, m as globalSecretScope, n as addonRoutesCapability, o as isDisplayIconKey, p as arrayItemFieldPath, s as loginMethodCapability, t as SSO_STATE_COOKIE, u as errMsg } from "../dist-CZ3P7blB.mjs";
2
2
  import * as crypto$1 from "node:crypto";
3
3
  //#region ../../node_modules/jose/dist/webapi/lib/buffer_utils.js
4
4
  var encoder = new TextEncoder(), decoder = new TextDecoder(), strictDecoder = new TextDecoder("utf-8", { fatal: !0 });
@@ -704,6 +704,7 @@ var DEFAULT_OIDC_ICON = "shield-check";
704
704
  var OIDC_CONNECTION_FORM_SCHEMA = { sections: [{
705
705
  id: "identity",
706
706
  title: "Identity",
707
+ columns: 2,
707
708
  fields: [{
708
709
  type: "text",
709
710
  key: "displayName",
@@ -720,6 +721,7 @@ var OIDC_CONNECTION_FORM_SCHEMA = { sections: [{
720
721
  }, {
721
722
  id: "idp",
722
723
  title: "Identity provider",
724
+ columns: 2,
723
725
  fields: [
724
726
  {
725
727
  type: "text",
@@ -1149,10 +1151,13 @@ var AuthOidcAddon = class extends BaseAddon {
1149
1151
  },
1150
1152
  deleteConnection: async (input) => {
1151
1153
  if (findOidcProvider(this.config, input.id) === null) throw new Error(`Unknown OIDC connection "${input.id}"`);
1154
+ await this.updateGlobalSettings({ providers: this.config.providers.map((p) => p.id === input.id ? {
1155
+ ...p,
1156
+ clientSecret: SECRET_CLEAR
1157
+ } : p) });
1152
1158
  const result = deleteOidcConnection(this.config, input.id);
1153
1159
  if (!result.ok) throw new Error(`Unknown OIDC connection "${input.id}"`);
1154
1160
  await this.updateGlobalSettings(result.config);
1155
- await this.clearSecrets([`providers[${input.id}].clientSecret`]);
1156
1161
  this.rebuildInstances();
1157
1162
  return { ok: true };
1158
1163
  }
@@ -1353,6 +1358,8 @@ var AuthOidcAddon = class extends BaseAddon {
1353
1358
  const inst = this.instances.get(providerId);
1354
1359
  if (!inst) throw new Error(`OIDC: provider "${providerId}" no longer configured`);
1355
1360
  const doc = await this.getDiscovery(providerId);
1361
+ const clientSecret = inst.config.clientSecret;
1362
+ if (typeof clientSecret !== "string" || clientSecret.length === 0) throw new Error(`OIDC: client secret for "${providerId}" is unavailable`);
1356
1363
  const tokenRes = await fetch(doc.token_endpoint, {
1357
1364
  method: "POST",
1358
1365
  headers: {
@@ -1364,7 +1371,7 @@ var AuthOidcAddon = class extends BaseAddon {
1364
1371
  code,
1365
1372
  redirect_uri: pending.redirectUri,
1366
1373
  client_id: inst.config.clientId,
1367
- client_secret: inst.config.clientSecret,
1374
+ client_secret: clientSecret,
1368
1375
  code_verifier: pending.codeVerifier
1369
1376
  })
1370
1377
  });
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.350",
21
+ version: "1.2.351",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_auth_webauthn_widgets",
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.2.277",
36
+ version: "1.2.279",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_auth_webauthn_widgets",
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-CiG_dP05.js");
5
+ const require_dist = require("../dist-CBTStyBW.js");
6
6
  let stream = require("stream");
7
7
  stream = require_dist.__toESM(stream, 1);
8
8
  let http = require("http");
@@ -1,4 +1,4 @@
1
- import { S as string, b as number, d as BaseAddon, l as userPasskeysCapability, r as addonWidgetsSourceCapability, s as loginMethodCapability, v as array, x as object, y as boolean } from "../dist-BOK-Ox5c.mjs";
1
+ import { S as string, b as number, d as BaseAddon, l as userPasskeysCapability, r as addonWidgetsSourceCapability, s as loginMethodCapability, v as array, x as object, y as boolean } from "../dist-CZ3P7blB.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import Stream from "stream";
4
4
  import http from "http";
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.2.350",
39
+ version: "1.2.351",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -81,7 +81,7 @@ async function r() {
81
81
  }
82
82
  },
83
83
  "@camstack/ui-library": {
84
- version: "1.2.277",
84
+ version: "1.2.279",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,
@@ -30,7 +30,7 @@ async function d(e) {
30
30
  }
31
31
  }
32
32
  async function f() {
33
- return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-WMEN28JY.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-Cp81tyGI.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-auth",
3
- "version": "1.2.139",
3
+ "version": "1.2.141",
4
4
  "description": "Authentication bundle — OIDC and WebAuthn/passkey. Multi-entry npm package shipping 2 addons under a single bundle; each addon keeps its own id, capabilities, and runner.",
5
5
  "keywords": [
6
6
  "camstack",