@camstack/addon-auth 1.2.140 → 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.
- package/dist/{dist-CiG_dP05.js → dist-CBTStyBW.js} +8 -1
- package/dist/{dist-BOK-Ox5c.mjs → dist-CZ3P7blB.mjs} +8 -1
- package/dist/oidc/auth-oidc.addon.js +8 -3
- package/dist/oidc/auth-oidc.addon.mjs +8 -3
- package/dist/webauthn/{_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-D1X8nA5T.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-Cp81tyGI.mjs} +2 -2
- package/dist/webauthn/auth-webauthn.addon.js +1 -1
- package/dist/webauthn/auth-webauthn.addon.mjs +1 -1
- package/dist/webauthn/{hostInit-CpAAx41z.mjs → hostInit-COK9XKtP.mjs} +2 -2
- package/dist/webauthn/remoteEntry.js +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
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
|
|
@@ -1156,10 +1156,13 @@ var AuthOidcAddon = class extends require_dist.BaseAddon {
|
|
|
1156
1156
|
},
|
|
1157
1157
|
deleteConnection: async (input) => {
|
|
1158
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) });
|
|
1159
1163
|
const result = deleteOidcConnection(this.config, input.id);
|
|
1160
1164
|
if (!result.ok) throw new Error(`Unknown OIDC connection "${input.id}"`);
|
|
1161
1165
|
await this.updateGlobalSettings(result.config);
|
|
1162
|
-
await this.clearSecrets([`providers[${input.id}].clientSecret`]);
|
|
1163
1166
|
this.rebuildInstances();
|
|
1164
1167
|
return { ok: true };
|
|
1165
1168
|
}
|
|
@@ -1360,6 +1363,8 @@ var AuthOidcAddon = class extends require_dist.BaseAddon {
|
|
|
1360
1363
|
const inst = this.instances.get(providerId);
|
|
1361
1364
|
if (!inst) throw new Error(`OIDC: provider "${providerId}" no longer configured`);
|
|
1362
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`);
|
|
1363
1368
|
const tokenRes = await fetch(doc.token_endpoint, {
|
|
1364
1369
|
method: "POST",
|
|
1365
1370
|
headers: {
|
|
@@ -1371,7 +1376,7 @@ var AuthOidcAddon = class extends require_dist.BaseAddon {
|
|
|
1371
1376
|
code,
|
|
1372
1377
|
redirect_uri: pending.redirectUri,
|
|
1373
1378
|
client_id: inst.config.clientId,
|
|
1374
|
-
client_secret:
|
|
1379
|
+
client_secret: clientSecret,
|
|
1375
1380
|
code_verifier: pending.codeVerifier
|
|
1376
1381
|
})
|
|
1377
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-
|
|
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 });
|
|
@@ -1151,10 +1151,13 @@ var AuthOidcAddon = class extends BaseAddon {
|
|
|
1151
1151
|
},
|
|
1152
1152
|
deleteConnection: async (input) => {
|
|
1153
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) });
|
|
1154
1158
|
const result = deleteOidcConnection(this.config, input.id);
|
|
1155
1159
|
if (!result.ok) throw new Error(`Unknown OIDC connection "${input.id}"`);
|
|
1156
1160
|
await this.updateGlobalSettings(result.config);
|
|
1157
|
-
await this.clearSecrets([`providers[${input.id}].clientSecret`]);
|
|
1158
1161
|
this.rebuildInstances();
|
|
1159
1162
|
return { ok: true };
|
|
1160
1163
|
}
|
|
@@ -1355,6 +1358,8 @@ var AuthOidcAddon = class extends BaseAddon {
|
|
|
1355
1358
|
const inst = this.instances.get(providerId);
|
|
1356
1359
|
if (!inst) throw new Error(`OIDC: provider "${providerId}" no longer configured`);
|
|
1357
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`);
|
|
1358
1363
|
const tokenRes = await fetch(doc.token_endpoint, {
|
|
1359
1364
|
method: "POST",
|
|
1360
1365
|
headers: {
|
|
@@ -1366,7 +1371,7 @@ var AuthOidcAddon = class extends BaseAddon {
|
|
|
1366
1371
|
code,
|
|
1367
1372
|
redirect_uri: pending.redirectUri,
|
|
1368
1373
|
client_id: inst.config.clientId,
|
|
1369
|
-
client_secret:
|
|
1374
|
+
client_secret: clientSecret,
|
|
1370
1375
|
code_verifier: pending.codeVerifier
|
|
1371
1376
|
})
|
|
1372
1377
|
});
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.2.
|
|
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.
|
|
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-
|
|
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-
|
|
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.
|
|
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.
|
|
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-
|
|
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.
|
|
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",
|