@thunderid/vue 1.14.0 → 1.15.0
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/cjs/index.cjs
CHANGED
|
@@ -876,7 +876,7 @@ var ThunderIDVueClient = class extends __thunderid_browser.ThunderIDBrowserClien
|
|
|
876
876
|
if (typeof arg1 === "object" && arg1 !== null && !(0, __thunderid_browser.isEmpty)(arg1) && ("executionId" in arg1 || "applicationId" in arg1)) {
|
|
877
877
|
const configData = await this.getStorageManager().getConfigData();
|
|
878
878
|
const authIdFromUrl = new URL(window.location.href).searchParams.get("authId");
|
|
879
|
-
const authIdFromStorage = await this.getStorageManager().
|
|
879
|
+
const authIdFromStorage = arg1.executionId ? await this.getStorageManager().getFlowAuthId(arg1.executionId) : void 0;
|
|
880
880
|
const authId = authIdFromUrl || authIdFromStorage || "";
|
|
881
881
|
const response = await (0, __thunderid_browser.executeEmbeddedSignInFlow)({
|
|
882
882
|
authId,
|
|
@@ -9459,12 +9459,24 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
9459
9459
|
if (executionId) sessionStorage.setItem(executionIdStorageKey, executionId);
|
|
9460
9460
|
else sessionStorage.removeItem(executionIdStorageKey);
|
|
9461
9461
|
};
|
|
9462
|
+
/**
|
|
9463
|
+
* Persist the authId from the URL against its execution, so another tab's sign-in cannot
|
|
9464
|
+
* replace it. ThunderIDVueClient.signIn() reads it back with getFlowAuthId(executionId).
|
|
9465
|
+
*/
|
|
9466
|
+
const storeAuthId = async (authId, executionId) => {
|
|
9467
|
+
const sm = getStorageManager();
|
|
9468
|
+
if (sm && authId && executionId) await sm.setFlowAuthId(executionId, authId);
|
|
9469
|
+
};
|
|
9470
|
+
const clearAuthId = async (executionId) => {
|
|
9471
|
+
const sm = getStorageManager();
|
|
9472
|
+
if (sm && executionId) await sm.removeFlowAuthId(executionId);
|
|
9473
|
+
};
|
|
9462
9474
|
const clearFlowState = async () => {
|
|
9475
|
+
const executionIdToClear = currentExecutionId.value;
|
|
9463
9476
|
persistExecutionId(null);
|
|
9464
9477
|
isFlowInitialized.value = false;
|
|
9465
9478
|
await setChallengeToken(null);
|
|
9466
|
-
|
|
9467
|
-
if (sm) await sm.removeHybridDataParameter("authId");
|
|
9479
|
+
await clearAuthId(executionIdToClear);
|
|
9468
9480
|
isTimeoutDisabled.value = false;
|
|
9469
9481
|
oauthCodeProcessedFlag.value = false;
|
|
9470
9482
|
};
|
|
@@ -9523,10 +9535,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
9523
9535
|
const initializeFlow = async () => {
|
|
9524
9536
|
const urlParams = getUrlParams$1();
|
|
9525
9537
|
oauthCodeProcessedFlag.value = false;
|
|
9526
|
-
|
|
9527
|
-
const sm = getStorageManager();
|
|
9528
|
-
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
9529
|
-
}
|
|
9538
|
+
await storeAuthId(urlParams.authId, urlParams.executionId);
|
|
9530
9539
|
const effectiveApplicationId = applicationId || urlParams.applicationId;
|
|
9531
9540
|
if (!urlParams.executionId && !effectiveApplicationId) {
|
|
9532
9541
|
setError(new __thunderid_browser.ThunderIDRuntimeError("Either executionId or applicationId is required for authentication", "SIGN_IN_ERROR", "vue"));
|
|
@@ -9546,10 +9555,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
9546
9555
|
const redirectURL = response.data?.redirectURL || response?.redirectURL;
|
|
9547
9556
|
if (redirectURL && window?.location) {
|
|
9548
9557
|
if (response.executionId) persistExecutionId(response.executionId);
|
|
9549
|
-
|
|
9550
|
-
const sm = getStorageManager();
|
|
9551
|
-
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
9552
|
-
}
|
|
9558
|
+
await storeAuthId(urlParams.authId, response.executionId);
|
|
9553
9559
|
initiateOAuthRedirect(redirectURL, vendor);
|
|
9554
9560
|
return;
|
|
9555
9561
|
}
|
|
@@ -9562,6 +9568,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
9562
9568
|
additionalData.value = normalizedAdditionalData ?? {};
|
|
9563
9569
|
isFlowInitialized.value = true;
|
|
9564
9570
|
isTimeoutDisabled.value = false;
|
|
9571
|
+
await storeAuthId(urlParams.authId, normalizedExecutionId);
|
|
9565
9572
|
cleanupFlowUrlParams();
|
|
9566
9573
|
}
|
|
9567
9574
|
} catch (error) {
|
|
@@ -9607,11 +9614,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
9607
9614
|
const redirectURL = response.data?.redirectURL || response?.redirectURL;
|
|
9608
9615
|
if (redirectURL && window?.location) {
|
|
9609
9616
|
if (response.executionId) persistExecutionId(response.executionId);
|
|
9610
|
-
|
|
9611
|
-
if (urlParams.authId) {
|
|
9612
|
-
const sm = getStorageManager();
|
|
9613
|
-
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
9614
|
-
}
|
|
9617
|
+
await storeAuthId(getUrlParams$1().authId, response.executionId);
|
|
9615
9618
|
initiateOAuthRedirect(redirectURL, vendor);
|
|
9616
9619
|
return;
|
|
9617
9620
|
}
|
|
@@ -9643,8 +9646,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
9643
9646
|
isSubmitting.value = false;
|
|
9644
9647
|
persistExecutionId(null);
|
|
9645
9648
|
isFlowInitialized.value = false;
|
|
9646
|
-
|
|
9647
|
-
if (sm) await sm.removeHybridDataParameter("authId");
|
|
9649
|
+
await clearAuthId(response.executionId || effectiveExecutionId);
|
|
9648
9650
|
cleanupOAuthUrlParams();
|
|
9649
9651
|
await setChallengeToken(null);
|
|
9650
9652
|
emit("success", {
|
|
@@ -9769,10 +9771,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
9769
9771
|
const tempData = await getStorageManager()?.getTemporaryData?.();
|
|
9770
9772
|
if (tempData?.challengeToken) challengeTokenRef.current = tempData.challengeToken;
|
|
9771
9773
|
} catch {}
|
|
9772
|
-
|
|
9773
|
-
const sm = getStorageManager();
|
|
9774
|
-
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
9775
|
-
}
|
|
9774
|
+
await storeAuthId(urlParams.authId, urlParams.executionId);
|
|
9776
9775
|
});
|
|
9777
9776
|
(0, vue.watch)(() => [
|
|
9778
9777
|
isInitialized.value,
|
|
@@ -18504,7 +18503,7 @@ const AgentCreate = (0, vue.defineComponent)({
|
|
|
18504
18503
|
},
|
|
18505
18504
|
owner: {
|
|
18506
18505
|
default: void 0,
|
|
18507
|
-
type:
|
|
18506
|
+
type: Object
|
|
18508
18507
|
},
|
|
18509
18508
|
preferences: adminFormProps.preferences,
|
|
18510
18509
|
title: adminFormProps.title
|
|
@@ -18656,7 +18655,7 @@ const BaseAgentDetails = (0, vue.defineComponent)({
|
|
|
18656
18655
|
},
|
|
18657
18656
|
{
|
|
18658
18657
|
label: t("admin.agents.details.owner"),
|
|
18659
|
-
value: agent.owner ?? t("admin.agents.details.no_owner")
|
|
18658
|
+
value: agent.owner?.id ?? t("admin.agents.details.no_owner")
|
|
18660
18659
|
},
|
|
18661
18660
|
{
|
|
18662
18661
|
label: t("admin.common.columns.organization_unit"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignIn.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/sign-in/SignIn.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,qBAAqB,EAErB,yBAAyB,EAIzB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,SAAS,EAcf,MAAM,KAAK,CAAC;AAmBb;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"SignIn.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/sign-in/SignIn.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,qBAAqB,EAErB,yBAAyB,EAIzB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,SAAS,EAcf,MAAM,KAAK,CAAC;AAmBb;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,MAAM,EAAE,SAulBZ,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentCreate.d.ts","sourceRoot":"","sources":["../../../../src/components/management/AgentCreate/AgentCreate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AgentCreate.d.ts","sourceRoot":"","sources":["../../../../src/components/management/AgentCreate/AgentCreate.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,SAAS,EAQf,MAAM,KAAK,CAAC;AAeb;;;;;;;;GAQG;AACH,QAAA,MAAM,WAAW,EAAE,SAgEjB,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -850,7 +850,7 @@ var ThunderIDVueClient = class extends ThunderIDBrowserClient {
|
|
|
850
850
|
if (typeof arg1 === "object" && arg1 !== null && !isEmpty(arg1) && ("executionId" in arg1 || "applicationId" in arg1)) {
|
|
851
851
|
const configData = await this.getStorageManager().getConfigData();
|
|
852
852
|
const authIdFromUrl = new URL(window.location.href).searchParams.get("authId");
|
|
853
|
-
const authIdFromStorage = await this.getStorageManager().
|
|
853
|
+
const authIdFromStorage = arg1.executionId ? await this.getStorageManager().getFlowAuthId(arg1.executionId) : void 0;
|
|
854
854
|
const authId = authIdFromUrl || authIdFromStorage || "";
|
|
855
855
|
const response = await executeEmbeddedSignInFlow({
|
|
856
856
|
authId,
|
|
@@ -9433,12 +9433,24 @@ const SignIn = defineComponent({
|
|
|
9433
9433
|
if (executionId) sessionStorage.setItem(executionIdStorageKey, executionId);
|
|
9434
9434
|
else sessionStorage.removeItem(executionIdStorageKey);
|
|
9435
9435
|
};
|
|
9436
|
+
/**
|
|
9437
|
+
* Persist the authId from the URL against its execution, so another tab's sign-in cannot
|
|
9438
|
+
* replace it. ThunderIDVueClient.signIn() reads it back with getFlowAuthId(executionId).
|
|
9439
|
+
*/
|
|
9440
|
+
const storeAuthId = async (authId, executionId) => {
|
|
9441
|
+
const sm = getStorageManager();
|
|
9442
|
+
if (sm && authId && executionId) await sm.setFlowAuthId(executionId, authId);
|
|
9443
|
+
};
|
|
9444
|
+
const clearAuthId = async (executionId) => {
|
|
9445
|
+
const sm = getStorageManager();
|
|
9446
|
+
if (sm && executionId) await sm.removeFlowAuthId(executionId);
|
|
9447
|
+
};
|
|
9436
9448
|
const clearFlowState = async () => {
|
|
9449
|
+
const executionIdToClear = currentExecutionId.value;
|
|
9437
9450
|
persistExecutionId(null);
|
|
9438
9451
|
isFlowInitialized.value = false;
|
|
9439
9452
|
await setChallengeToken(null);
|
|
9440
|
-
|
|
9441
|
-
if (sm) await sm.removeHybridDataParameter("authId");
|
|
9453
|
+
await clearAuthId(executionIdToClear);
|
|
9442
9454
|
isTimeoutDisabled.value = false;
|
|
9443
9455
|
oauthCodeProcessedFlag.value = false;
|
|
9444
9456
|
};
|
|
@@ -9497,10 +9509,7 @@ const SignIn = defineComponent({
|
|
|
9497
9509
|
const initializeFlow = async () => {
|
|
9498
9510
|
const urlParams = getUrlParams$1();
|
|
9499
9511
|
oauthCodeProcessedFlag.value = false;
|
|
9500
|
-
|
|
9501
|
-
const sm = getStorageManager();
|
|
9502
|
-
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
9503
|
-
}
|
|
9512
|
+
await storeAuthId(urlParams.authId, urlParams.executionId);
|
|
9504
9513
|
const effectiveApplicationId = applicationId || urlParams.applicationId;
|
|
9505
9514
|
if (!urlParams.executionId && !effectiveApplicationId) {
|
|
9506
9515
|
setError(new ThunderIDRuntimeError$1("Either executionId or applicationId is required for authentication", "SIGN_IN_ERROR", "vue"));
|
|
@@ -9520,10 +9529,7 @@ const SignIn = defineComponent({
|
|
|
9520
9529
|
const redirectURL = response.data?.redirectURL || response?.redirectURL;
|
|
9521
9530
|
if (redirectURL && window?.location) {
|
|
9522
9531
|
if (response.executionId) persistExecutionId(response.executionId);
|
|
9523
|
-
|
|
9524
|
-
const sm = getStorageManager();
|
|
9525
|
-
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
9526
|
-
}
|
|
9532
|
+
await storeAuthId(urlParams.authId, response.executionId);
|
|
9527
9533
|
initiateOAuthRedirect(redirectURL, vendor);
|
|
9528
9534
|
return;
|
|
9529
9535
|
}
|
|
@@ -9536,6 +9542,7 @@ const SignIn = defineComponent({
|
|
|
9536
9542
|
additionalData.value = normalizedAdditionalData ?? {};
|
|
9537
9543
|
isFlowInitialized.value = true;
|
|
9538
9544
|
isTimeoutDisabled.value = false;
|
|
9545
|
+
await storeAuthId(urlParams.authId, normalizedExecutionId);
|
|
9539
9546
|
cleanupFlowUrlParams();
|
|
9540
9547
|
}
|
|
9541
9548
|
} catch (error) {
|
|
@@ -9581,11 +9588,7 @@ const SignIn = defineComponent({
|
|
|
9581
9588
|
const redirectURL = response.data?.redirectURL || response?.redirectURL;
|
|
9582
9589
|
if (redirectURL && window?.location) {
|
|
9583
9590
|
if (response.executionId) persistExecutionId(response.executionId);
|
|
9584
|
-
|
|
9585
|
-
if (urlParams.authId) {
|
|
9586
|
-
const sm = getStorageManager();
|
|
9587
|
-
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
9588
|
-
}
|
|
9591
|
+
await storeAuthId(getUrlParams$1().authId, response.executionId);
|
|
9589
9592
|
initiateOAuthRedirect(redirectURL, vendor);
|
|
9590
9593
|
return;
|
|
9591
9594
|
}
|
|
@@ -9617,8 +9620,7 @@ const SignIn = defineComponent({
|
|
|
9617
9620
|
isSubmitting.value = false;
|
|
9618
9621
|
persistExecutionId(null);
|
|
9619
9622
|
isFlowInitialized.value = false;
|
|
9620
|
-
|
|
9621
|
-
if (sm) await sm.removeHybridDataParameter("authId");
|
|
9623
|
+
await clearAuthId(response.executionId || effectiveExecutionId);
|
|
9622
9624
|
cleanupOAuthUrlParams();
|
|
9623
9625
|
await setChallengeToken(null);
|
|
9624
9626
|
emit("success", {
|
|
@@ -9743,10 +9745,7 @@ const SignIn = defineComponent({
|
|
|
9743
9745
|
const tempData = await getStorageManager()?.getTemporaryData?.();
|
|
9744
9746
|
if (tempData?.challengeToken) challengeTokenRef.current = tempData.challengeToken;
|
|
9745
9747
|
} catch {}
|
|
9746
|
-
|
|
9747
|
-
const sm = getStorageManager();
|
|
9748
|
-
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
9749
|
-
}
|
|
9748
|
+
await storeAuthId(urlParams.authId, urlParams.executionId);
|
|
9750
9749
|
});
|
|
9751
9750
|
watch(() => [
|
|
9752
9751
|
isInitialized.value,
|
|
@@ -18478,7 +18477,7 @@ const AgentCreate = defineComponent({
|
|
|
18478
18477
|
},
|
|
18479
18478
|
owner: {
|
|
18480
18479
|
default: void 0,
|
|
18481
|
-
type:
|
|
18480
|
+
type: Object
|
|
18482
18481
|
},
|
|
18483
18482
|
preferences: adminFormProps.preferences,
|
|
18484
18483
|
title: adminFormProps.title
|
|
@@ -18630,7 +18629,7 @@ const BaseAgentDetails = defineComponent({
|
|
|
18630
18629
|
},
|
|
18631
18630
|
{
|
|
18632
18631
|
label: t("admin.agents.details.owner"),
|
|
18633
|
-
value: agent.owner ?? t("admin.agents.details.no_owner")
|
|
18632
|
+
value: agent.owner?.id ?? t("admin.agents.details.no_owner")
|
|
18634
18633
|
},
|
|
18635
18634
|
{
|
|
18636
18635
|
label: t("admin.common.columns.organization_unit"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thunderid/vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Vue SDK for ThunderID",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"thunderid",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@thunderid/browser": "^1.
|
|
60
|
+
"@thunderid/browser": "^1.13.0",
|
|
61
61
|
"dompurify": "3.4.17",
|
|
62
62
|
"tslib": "2.8.1"
|
|
63
63
|
},
|