@thunderid/vue 0.3.5 → 0.5.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/ThunderIDVueClient.d.ts.map +1 -1
- package/dist/cjs/index.cjs +62 -39
- package/dist/components/auth/Callback.d.ts.map +1 -1
- package/dist/components/auth/sign-in/SignIn.d.ts.map +1 -1
- package/dist/components/auth/sign-up/BaseSignUp.d.ts.map +1 -1
- package/dist/components/presentation/accept-invite/BaseAcceptInvite.d.ts.map +1 -1
- package/dist/components/primitives/Button/Button.d.ts.map +1 -1
- package/dist/components/primitives/TextField/TextField.d.ts.map +1 -1
- package/dist/index.js +63 -40
- package/dist/models/contexts.d.ts +5 -0
- package/dist/models/contexts.d.ts.map +1 -1
- package/dist/plugins/ThunderIDPlugin.d.ts +5 -0
- package/dist/plugins/ThunderIDPlugin.d.ts.map +1 -1
- package/dist/providers/I18nProvider.d.ts.map +1 -1
- package/dist/providers/ThunderIDProvider.d.ts.map +1 -1
- package/dist/styles/injectStyles.d.ts +4 -1
- package/dist/styles/injectStyles.d.ts.map +1 -1
- package/dist/utils/oauth.d.ts +2 -1
- package/dist/utils/oauth.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThunderIDVueClient.d.ts","sourceRoot":"","sources":["../src/ThunderIDVueClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,sBAAsB,EAGtB,WAAW,EACX,IAAI,EAMJ,OAAO,EAEP,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAK1B,cAAc,EACf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD;;;;;GAKG;AACH,cAAM,kBAAkB,CAAC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,CAAE,SAAQ,sBAAsB,CAAC,CAAC,CA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AAO,CAAC,aAAa,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAItE,UAAU,CAAC,cAAc,CAAC,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IAIrE,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIzD,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAIhC,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzF,cAAc,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3E,iBAAiB,IAAI,cAAc,CAAC,CAAC,CAAC;CAGvD;AAED,eAAe,kBAAkB,CAAC"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -300,7 +300,6 @@ const createVueLogger = (component) => (0, __thunderid_browser.createPackageComp
|
|
|
300
300
|
//#endregion
|
|
301
301
|
//#region src/providers/I18nProvider.ts
|
|
302
302
|
const logger$4 = createVueLogger("I18nProvider");
|
|
303
|
-
const DEFAULT_STORAGE_KEY = "thunderid-i18n-language";
|
|
304
303
|
const DEFAULT_URL_PARAM = "lang";
|
|
305
304
|
const deriveRootDomain = (hostname) => {
|
|
306
305
|
const parts = hostname.split(".");
|
|
@@ -365,14 +364,20 @@ const detectBrowserLanguage = () => {
|
|
|
365
364
|
};
|
|
366
365
|
const I18nProvider = (0, vue.defineComponent)({
|
|
367
366
|
name: "I18nProvider",
|
|
368
|
-
props: {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
367
|
+
props: {
|
|
368
|
+
preferences: {
|
|
369
|
+
default: void 0,
|
|
370
|
+
type: Object
|
|
371
|
+
},
|
|
372
|
+
vendor: {
|
|
373
|
+
default: void 0,
|
|
374
|
+
type: String
|
|
375
|
+
}
|
|
376
|
+
},
|
|
372
377
|
setup(props, { slots }) {
|
|
373
378
|
const defaultBundles = (0, __thunderid_browser.getDefaultI18nBundles)();
|
|
374
379
|
const storageStrategy = props.preferences?.storageStrategy ?? "cookie";
|
|
375
|
-
const storageKey = props.preferences?.storageKey ??
|
|
380
|
+
const storageKey = props.preferences?.storageKey ?? `${(0, __thunderid_browser.getVendorPrefix)(props.vendor)}-i18n-language`;
|
|
376
381
|
const urlParamConfig = props.preferences?.urlParam === void 0 ? DEFAULT_URL_PARAM : props.preferences.urlParam;
|
|
377
382
|
const storage = createStorageAdapter(storageStrategy, storageKey, storageStrategy === "cookie" ? props.preferences?.cookieDomain ?? (typeof window !== "undefined" ? deriveRootDomain(window.location.hostname) : void 0) : void 0);
|
|
378
383
|
const determineInitialLanguage = () => {
|
|
@@ -774,12 +779,8 @@ var ThunderIDVueClient = class extends __thunderid_browser.ThunderIDBrowserClien
|
|
|
774
779
|
const configData = await this.getStorageManager().getConfigData();
|
|
775
780
|
const firstArg = args[0];
|
|
776
781
|
const baseUrl = configData?.baseUrl || "";
|
|
777
|
-
const authIdFromUrl = new URL(window.location.href).searchParams.get("authId");
|
|
778
|
-
const authIdFromStorage = await this.getStorageManager().getHybridDataParameter("authId");
|
|
779
|
-
const authId = authIdFromUrl || authIdFromStorage || "";
|
|
780
|
-
if (authIdFromUrl && !authIdFromStorage) await this.getStorageManager().setHybridDataParameter("authId", authIdFromUrl);
|
|
781
782
|
const response = await (0, __thunderid_browser.executeEmbeddedSignUpFlow)({
|
|
782
|
-
authId,
|
|
783
|
+
authId: new URL(window.location.href).searchParams.get("authId") ?? "",
|
|
783
784
|
baseUrl,
|
|
784
785
|
payload: typeof firstArg === "object" && "flowType" in firstArg ? {
|
|
785
786
|
...firstArg,
|
|
@@ -907,10 +908,15 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
907
908
|
syncSession: {
|
|
908
909
|
default: void 0,
|
|
909
910
|
type: Boolean
|
|
911
|
+
},
|
|
912
|
+
vendor: {
|
|
913
|
+
default: void 0,
|
|
914
|
+
type: String
|
|
910
915
|
}
|
|
911
916
|
},
|
|
912
917
|
setup(props, { slots }) {
|
|
913
918
|
const client = new ThunderIDVueClient_default(props.instanceId);
|
|
919
|
+
const vendor = (0, __thunderid_browser.getVendorPrefix)(props.vendor);
|
|
914
920
|
const isSignedIn = (0, vue.ref)(false);
|
|
915
921
|
const isInitialized = (0, vue.ref)(false);
|
|
916
922
|
const isLoading = (0, vue.ref)(true);
|
|
@@ -934,7 +940,8 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
934
940
|
signInUrl: props.signInUrl,
|
|
935
941
|
signUpUrl: props.signUpUrl,
|
|
936
942
|
storage: props.storage,
|
|
937
|
-
syncSession: props.syncSession
|
|
943
|
+
syncSession: props.syncSession,
|
|
944
|
+
vendor
|
|
938
945
|
};
|
|
939
946
|
}
|
|
940
947
|
async function updateSession() {
|
|
@@ -1031,14 +1038,15 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
1031
1038
|
signUp,
|
|
1032
1039
|
signUpUrl: props.signUpUrl,
|
|
1033
1040
|
storage: props.storage,
|
|
1034
|
-
user
|
|
1041
|
+
user,
|
|
1042
|
+
vendor
|
|
1035
1043
|
});
|
|
1036
1044
|
(0, vue.onMounted)(async () => {
|
|
1037
1045
|
const config = buildConfig();
|
|
1038
1046
|
await client.initialize(config);
|
|
1039
1047
|
await client.getDiscoveryResponse();
|
|
1040
1048
|
const initializedConfig = await client.getConfiguration();
|
|
1041
|
-
if (initializedConfig?.baseUrl) sessionStorage.setItem(
|
|
1049
|
+
if (initializedConfig?.baseUrl) sessionStorage.setItem(`${vendor}_base_url`, initializedConfig.baseUrl);
|
|
1042
1050
|
try {
|
|
1043
1051
|
isInitialized.value = await client.isInitialized();
|
|
1044
1052
|
} catch {
|
|
@@ -1054,7 +1062,7 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
1054
1062
|
const urlParams = currentUrl.searchParams;
|
|
1055
1063
|
const code = urlParams.get("code");
|
|
1056
1064
|
const executionIdFromUrl = urlParams.get("executionId");
|
|
1057
|
-
const storedExecutionId = sessionStorage.getItem(
|
|
1065
|
+
const storedExecutionId = sessionStorage.getItem(`${vendor}_execution_id`);
|
|
1058
1066
|
if (code && !executionIdFromUrl && !storedExecutionId) await signIn();
|
|
1059
1067
|
} catch (error) {
|
|
1060
1068
|
throw new __thunderid_browser.ThunderIDRuntimeError(`Sign in failed: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`, "thunderid-signIn-Error", "vue", "An error occurred while trying to sign in.");
|
|
@@ -1086,7 +1094,7 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
1086
1094
|
if (signInCheckInterval) clearInterval(signInCheckInterval);
|
|
1087
1095
|
if (loadingCheckInterval) clearInterval(loadingCheckInterval);
|
|
1088
1096
|
});
|
|
1089
|
-
return () => (0, vue.h)(I18nProvider_default,
|
|
1097
|
+
return () => (0, vue.h)(I18nProvider_default, { vendor }, { default: () => (0, vue.h)(FlowMetaProvider_default, { enabled: true }, { default: () => (0, vue.h)(ThemeProvider_default, null, { default: () => (0, vue.h)(FlowProvider_default, null, { default: () => (0, vue.h)(UserProvider_default, {
|
|
1090
1098
|
onUpdateProfile: (updatedUser) => {
|
|
1091
1099
|
user.value = updatedUser;
|
|
1092
1100
|
userProfile.value = {
|
|
@@ -3607,7 +3615,6 @@ var Typography_css_default = TYPOGRAPHY_CSS;
|
|
|
3607
3615
|
|
|
3608
3616
|
//#endregion
|
|
3609
3617
|
//#region src/styles/injectStyles.ts
|
|
3610
|
-
const STYLE_ID = "thunderid-vue-styles";
|
|
3611
3618
|
/**
|
|
3612
3619
|
* Assembled CSS for all ThunderID Vue components.
|
|
3613
3620
|
* Order is intentional:
|
|
@@ -3638,12 +3645,16 @@ const STYLES = [
|
|
|
3638
3645
|
/**
|
|
3639
3646
|
* Injects ThunderID Vue component styles into the document `<head>` once.
|
|
3640
3647
|
* Subsequent calls are no-ops (idempotent).
|
|
3648
|
+
*
|
|
3649
|
+
* @param vendor - Vendor/brand namespace used to derive the dedupe `<style>` element id
|
|
3650
|
+
* (e.g. `${vendor}-vue-styles`). Defaults to `VendorConstants.VENDOR_PREFIX`.
|
|
3641
3651
|
*/
|
|
3642
|
-
function injectStyles() {
|
|
3652
|
+
function injectStyles(vendor) {
|
|
3643
3653
|
if (typeof document === "undefined") return;
|
|
3644
|
-
|
|
3654
|
+
const styleId = `${(0, __thunderid_browser.getVendorPrefix)(vendor)}-vue-styles`;
|
|
3655
|
+
if (document.getElementById(styleId)) return;
|
|
3645
3656
|
const style = document.createElement("style");
|
|
3646
|
-
style.id =
|
|
3657
|
+
style.id = styleId;
|
|
3647
3658
|
style.textContent = STYLES;
|
|
3648
3659
|
document.head.appendChild(style);
|
|
3649
3660
|
}
|
|
@@ -3677,7 +3688,7 @@ function injectStyles() {
|
|
|
3677
3688
|
* ```
|
|
3678
3689
|
*/
|
|
3679
3690
|
const ThunderIDPlugin = { install(app, options) {
|
|
3680
|
-
injectStyles();
|
|
3691
|
+
injectStyles(options?.vendor);
|
|
3681
3692
|
if (options?.mode === "delegated") return;
|
|
3682
3693
|
app.component("ThunderIDProvider", ThunderIDProvider_default);
|
|
3683
3694
|
} };
|
|
@@ -4025,6 +4036,7 @@ const Button = (0, vue.defineComponent)({
|
|
|
4025
4036
|
attrs.class || ""
|
|
4026
4037
|
].filter(Boolean).join(" "),
|
|
4027
4038
|
disabled: props.disabled || props.loading,
|
|
4039
|
+
id: attrs["id"],
|
|
4028
4040
|
onClick: (e) => emit("click", e),
|
|
4029
4041
|
style: attrs.style,
|
|
4030
4042
|
type: props.type
|
|
@@ -4118,6 +4130,10 @@ const TextField = (0, vue.defineComponent)({
|
|
|
4118
4130
|
default: void 0,
|
|
4119
4131
|
type: String
|
|
4120
4132
|
},
|
|
4133
|
+
id: {
|
|
4134
|
+
default: void 0,
|
|
4135
|
+
type: String
|
|
4136
|
+
},
|
|
4121
4137
|
label: {
|
|
4122
4138
|
default: void 0,
|
|
4123
4139
|
type: String
|
|
@@ -4162,14 +4178,14 @@ const TextField = (0, vue.defineComponent)({
|
|
|
4162
4178
|
}, [
|
|
4163
4179
|
props.label ? (0, vue.h)("label", {
|
|
4164
4180
|
class: (0, __thunderid_browser.withVendorCSSClassPrefix)("text-field__label"),
|
|
4165
|
-
for: props.name
|
|
4181
|
+
for: props.id ?? props.name
|
|
4166
4182
|
}, [props.label, props.required ? (0, vue.h)("span", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("text-field__required") }, " *") : null]) : null,
|
|
4167
4183
|
(0, vue.h)("input", {
|
|
4168
4184
|
autocomplete: props.autoComplete,
|
|
4169
4185
|
class: (0, __thunderid_browser.withVendorCSSClassPrefix)("text-field__input"),
|
|
4170
4186
|
"data-testid": attrs["data-testid"],
|
|
4171
4187
|
disabled: props.disabled,
|
|
4172
|
-
id: props.name,
|
|
4188
|
+
id: props.id ?? props.name,
|
|
4173
4189
|
name: props.name,
|
|
4174
4190
|
onBlur: () => emit("blur"),
|
|
4175
4191
|
onInput: (e) => emit("update:modelValue", e.target.value),
|
|
@@ -5255,6 +5271,7 @@ const Callback = (0, vue.defineComponent)({
|
|
|
5255
5271
|
}
|
|
5256
5272
|
},
|
|
5257
5273
|
setup(props) {
|
|
5274
|
+
const vendor = (0, __thunderid_browser.getVendorPrefix)((0, vue.inject)(THUNDERID_KEY, null)?.vendor);
|
|
5258
5275
|
const navigate$4 = (path) => {
|
|
5259
5276
|
if (props.onNavigate) props.onNavigate(path);
|
|
5260
5277
|
else (0, __thunderid_browser.navigate)(path);
|
|
@@ -5280,7 +5297,7 @@ const Callback = (0, vue.defineComponent)({
|
|
|
5280
5297
|
return;
|
|
5281
5298
|
}
|
|
5282
5299
|
if (!state) throw new Error("Missing OAuth state parameter - possible security issue");
|
|
5283
|
-
const storedData = sessionStorage.getItem(
|
|
5300
|
+
const storedData = sessionStorage.getItem(`${vendor}_oauth_${state}`);
|
|
5284
5301
|
if (!storedData) {
|
|
5285
5302
|
if (oauthError) {
|
|
5286
5303
|
const errorMsg = errorDescription || oauthError || "OAuth authentication failed";
|
|
@@ -5297,10 +5314,10 @@ const Callback = (0, vue.defineComponent)({
|
|
|
5297
5314
|
const { path, timestamp } = JSON.parse(storedData);
|
|
5298
5315
|
returnPath = path || "/";
|
|
5299
5316
|
if (Date.now() - timestamp > 3e5) {
|
|
5300
|
-
sessionStorage.removeItem(
|
|
5317
|
+
sessionStorage.removeItem(`${vendor}_oauth_${state}`);
|
|
5301
5318
|
throw new Error("OAuth state expired - please try again");
|
|
5302
5319
|
}
|
|
5303
|
-
sessionStorage.removeItem(
|
|
5320
|
+
sessionStorage.removeItem(`${vendor}_oauth_${state}`);
|
|
5304
5321
|
if (oauthError) {
|
|
5305
5322
|
const errorMsg = errorDescription || oauthError || "OAuth authentication failed";
|
|
5306
5323
|
const err = new Error(errorMsg);
|
|
@@ -6422,13 +6439,14 @@ var BaseSignIn_default = BaseSignIn;
|
|
|
6422
6439
|
* Generates random state, stores return path in sessionStorage, and redirects to OAuth provider.
|
|
6423
6440
|
*
|
|
6424
6441
|
* @param redirectURL - OAuth authorization URL from the server
|
|
6442
|
+
* @param vendor - Vendor/brand namespace used to prefix the sessionStorage key. Defaults to `'thunderid'`.
|
|
6425
6443
|
*/
|
|
6426
|
-
function initiateOAuthRedirect(redirectURL) {
|
|
6444
|
+
function initiateOAuthRedirect(redirectURL, vendor) {
|
|
6427
6445
|
const basePath = document.querySelector("base")?.getAttribute("href") || "";
|
|
6428
6446
|
let returnPath = window.location.pathname;
|
|
6429
6447
|
if (basePath && returnPath.startsWith(basePath)) returnPath = returnPath.slice(basePath.length) || "/";
|
|
6430
6448
|
const state = crypto.randomUUID();
|
|
6431
|
-
sessionStorage.setItem(
|
|
6449
|
+
sessionStorage.setItem(`${(0, __thunderid_browser.getVendorPrefix)(vendor)}_oauth_${state}`, JSON.stringify({
|
|
6432
6450
|
path: returnPath,
|
|
6433
6451
|
timestamp: Date.now()
|
|
6434
6452
|
}));
|
|
@@ -6525,7 +6543,6 @@ const handlePasskeyAuthentication = async (challengeData) => {
|
|
|
6525
6543
|
|
|
6526
6544
|
//#endregion
|
|
6527
6545
|
//#region src/components/auth/sign-in/SignIn.ts
|
|
6528
|
-
const EXECUTION_ID_STORAGE_KEY = "thunderid_execution_id";
|
|
6529
6546
|
/**
|
|
6530
6547
|
* SignIn — app-native sign-in component with full flow lifecycle management.
|
|
6531
6548
|
*
|
|
@@ -6564,9 +6581,10 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
6564
6581
|
},
|
|
6565
6582
|
emits: ["error", "success"],
|
|
6566
6583
|
setup(props, { slots, emit, attrs }) {
|
|
6567
|
-
const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading: sdkLoading, scopes, getStorageManager } = useThunderID_default();
|
|
6584
|
+
const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading: sdkLoading, scopes, getStorageManager, vendor } = useThunderID_default();
|
|
6568
6585
|
const { meta: flowMeta } = useFlowMeta_default();
|
|
6569
6586
|
const { t } = useI18n_default();
|
|
6587
|
+
const executionIdStorageKey = `${vendor}_execution_id`;
|
|
6570
6588
|
const components = (0, vue.ref)([]);
|
|
6571
6589
|
const additionalData = (0, vue.ref)({});
|
|
6572
6590
|
const currentExecutionId = (0, vue.ref)(null);
|
|
@@ -6587,8 +6605,8 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
6587
6605
|
let passkeyProcessed = false;
|
|
6588
6606
|
const persistExecutionId = (executionId) => {
|
|
6589
6607
|
currentExecutionId.value = executionId;
|
|
6590
|
-
if (executionId) sessionStorage.setItem(
|
|
6591
|
-
else sessionStorage.removeItem(
|
|
6608
|
+
if (executionId) sessionStorage.setItem(executionIdStorageKey, executionId);
|
|
6609
|
+
else sessionStorage.removeItem(executionIdStorageKey);
|
|
6592
6610
|
};
|
|
6593
6611
|
const clearFlowState = async () => {
|
|
6594
6612
|
persistExecutionId(null);
|
|
@@ -6668,7 +6686,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
6668
6686
|
const sm = getStorageManager();
|
|
6669
6687
|
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
6670
6688
|
}
|
|
6671
|
-
initiateOAuthRedirect(redirectURL);
|
|
6689
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
6672
6690
|
return;
|
|
6673
6691
|
}
|
|
6674
6692
|
}
|
|
@@ -6742,7 +6760,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
6742
6760
|
const sm = getStorageManager();
|
|
6743
6761
|
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
6744
6762
|
}
|
|
6745
|
-
initiateOAuthRedirect(redirectURL);
|
|
6763
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
6746
6764
|
return;
|
|
6747
6765
|
}
|
|
6748
6766
|
}
|
|
@@ -6875,7 +6893,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
6875
6893
|
}, { deep: true });
|
|
6876
6894
|
useOAuthCallback({
|
|
6877
6895
|
currentFlowId: currentExecutionId,
|
|
6878
|
-
flowIdStorageKey:
|
|
6896
|
+
flowIdStorageKey: executionIdStorageKey,
|
|
6879
6897
|
isInitialized,
|
|
6880
6898
|
isSubmitting,
|
|
6881
6899
|
onError: (err) => {
|
|
@@ -7388,8 +7406,10 @@ const BaseSignUp = (0, vue.defineComponent)({
|
|
|
7388
7406
|
}
|
|
7389
7407
|
}, { deep: true });
|
|
7390
7408
|
(0, vue.watch)(() => [props.isInitialized, isFlowInitialized.value], ([initialized, flowInit]) => {
|
|
7391
|
-
|
|
7392
|
-
|
|
7409
|
+
if (typeof window !== "undefined") {
|
|
7410
|
+
const urlParams = new URL(window.location.href).searchParams;
|
|
7411
|
+
if (urlParams.get("code") || urlParams.get("state")) return;
|
|
7412
|
+
}
|
|
7393
7413
|
if (initialized && !flowInit && !initializationAttempted) {
|
|
7394
7414
|
initializationAttempted = true;
|
|
7395
7415
|
(async () => {
|
|
@@ -8616,6 +8636,8 @@ const BaseAcceptInvite = (0, vue.defineComponent)({
|
|
|
8616
8636
|
setup(props, { slots }) {
|
|
8617
8637
|
const { meta: metaRef } = useFlowMeta_default();
|
|
8618
8638
|
const { t } = useI18n_default();
|
|
8639
|
+
const vendor = (0, __thunderid_browser.getVendorPrefix)((0, vue.inject)(THUNDERID_KEY, null)?.vendor);
|
|
8640
|
+
const flowIdStorageKey = `${vendor}_flow_id`;
|
|
8619
8641
|
const isLoading = (0, vue.ref)(false);
|
|
8620
8642
|
const isValidatingToken = (0, vue.ref)(true);
|
|
8621
8643
|
const isTokenInvalid = (0, vue.ref)(false);
|
|
@@ -8653,6 +8675,7 @@ const BaseAcceptInvite = (0, vue.defineComponent)({
|
|
|
8653
8675
|
};
|
|
8654
8676
|
useOAuthCallback({
|
|
8655
8677
|
currentFlowId: (0, vue.ref)(props.flowId ?? null),
|
|
8678
|
+
flowIdStorageKey,
|
|
8656
8679
|
isInitialized: (0, vue.ref)(true),
|
|
8657
8680
|
onComplete: () => {
|
|
8658
8681
|
isComplete.value = true;
|
|
@@ -8745,7 +8768,7 @@ const BaseAcceptInvite = (0, vue.defineComponent)({
|
|
|
8745
8768
|
if (response.type === "REDIRECTION") {
|
|
8746
8769
|
const redirectURL = response.data?.redirectURL || response?.redirectURL;
|
|
8747
8770
|
if (redirectURL) {
|
|
8748
|
-
initiateOAuthRedirect(redirectURL);
|
|
8771
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
8749
8772
|
return;
|
|
8750
8773
|
}
|
|
8751
8774
|
}
|
|
@@ -8786,7 +8809,7 @@ const BaseAcceptInvite = (0, vue.defineComponent)({
|
|
|
8786
8809
|
isValidatingToken.value = true;
|
|
8787
8810
|
apiError.value = null;
|
|
8788
8811
|
try {
|
|
8789
|
-
if (flowId) sessionStorage.setItem(
|
|
8812
|
+
if (flowId) sessionStorage.setItem(flowIdStorageKey, flowId);
|
|
8790
8813
|
const payload = {
|
|
8791
8814
|
flowId,
|
|
8792
8815
|
inputs: { inviteToken },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callback.d.ts","sourceRoot":"","sources":["../../../src/components/auth/Callback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"Callback.d.ts","sourceRoot":"","sources":["../../../src/components/auth/Callback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,KAAK,SAAS,EAAqC,MAAM,KAAK,CAAC;AAYvE;;;;;;;;;;GAUG;AACH,QAAA,MAAM,QAAQ,EAAE,SAmId,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignIn.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/sign-in/SignIn.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAGL,qBAAqB,EAErB,yBAAyB,EAIzB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,SAAS,EAWf,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"SignIn.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/sign-in/SignIn.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAGL,qBAAqB,EAErB,yBAAyB,EAIzB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,SAAS,EAWf,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,CAA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e,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1C,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,OAAO,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;CAC5C;AA8BD;;;;;GAKG;AACH,QAAA,MAAM,UAAU,EAAE,SA+jBhB,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAcceptInvite.d.ts","sourceRoot":"","sources":["../../../../src/components/presentation/accept-invite/BaseAcceptInvite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"BaseAcceptInvite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E,GAAG,CAAC,KAAK,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAC9E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,OAAO,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;CACnC;AAED;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,EAAE,SAsctB,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/Button/Button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,KAAK,SAAS,EAAmE,MAAM,KAAK,CAAC;AAcrG,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/Button/Button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,KAAK,SAAS,EAAmE,MAAM,KAAK,CAAC;AAcrG,QAAA,MAAM,MAAM,EAAE,SA6DZ,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/TextField/TextField.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,KAAK,SAAS,EAAmE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/primitives/TextField/TextField.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,KAAK,SAAS,EAAmE,MAAM,KAAK,CAAC;AAgBrG,QAAA,MAAM,SAAS,EAAE,SAuEf,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_THEME, EmbeddedFlowActionVariant, EmbeddedFlowComponentType, EmbeddedFlowComponentType as EmbeddedFlowComponentType$1, EmbeddedFlowEventType, EmbeddedFlowEventType as EmbeddedFlowEventType$1, EmbeddedFlowResponseType, EmbeddedFlowTextVariant, EmbeddedFlowType, EmbeddedSignInFlowStatus, EmbeddedSignInFlowStatus as EmbeddedSignInFlowStatus$1, EmbeddedSignInFlowType, EmbeddedSignInFlowType as EmbeddedSignInFlowType$1, EmbeddedSignUpFlowStatus, EmbeddedSignUpFlowStatus as EmbeddedSignUpFlowStatus$1, EmbeddedSignUpFlowType, FetchHttpClient, FieldType, FieldType as FieldType$1, FlowMetaType, ThunderIDBrowserClient, ThunderIDError, ThunderIDRuntimeError, ThunderIDRuntimeError as ThunderIDRuntimeError$1, TranslationBundleConstants, WellKnownSchemaIds, arrayBufferToBase64url, base64urlToArrayBuffer, createClassObserver, createClassObserver as createClassObserver$1, createMediaQueryListener, createMediaQueryListener as createMediaQueryListener$1, createPackageComponentLogger, createPackageLogger, createTheme, deepMerge, detectThemeMode, detectThemeMode as detectThemeMode$1, executeEmbeddedSignInFlow, executeEmbeddedSignUpFlow, extractEmojiFromUri, extractUserClaimsFromIdToken, flattenUserSchema, generateFlattenedUserProfile, generateUserProfile, get, getActiveTheme, getDefaultI18nBundles, getFlowMeta, getSchemas, getScim2Me, handleWebAuthnAuthentication, hasAuthParamsInUrl, hasAuthParamsInUrl as hasAuthParamsInUrl$1, hasCalledForThisInstanceInUrl, http, isEmojiUri, isEmpty, navigate, navigate as navigate$1, normalizeTranslations, resolveFlowTemplateLiterals, updateMeProfile, withVendorCSSClassPrefix } from "@thunderid/browser";
|
|
1
|
+
import { DEFAULT_THEME, EmbeddedFlowActionVariant, EmbeddedFlowComponentType, EmbeddedFlowComponentType as EmbeddedFlowComponentType$1, EmbeddedFlowEventType, EmbeddedFlowEventType as EmbeddedFlowEventType$1, EmbeddedFlowResponseType, EmbeddedFlowTextVariant, EmbeddedFlowType, EmbeddedSignInFlowStatus, EmbeddedSignInFlowStatus as EmbeddedSignInFlowStatus$1, EmbeddedSignInFlowType, EmbeddedSignInFlowType as EmbeddedSignInFlowType$1, EmbeddedSignUpFlowStatus, EmbeddedSignUpFlowStatus as EmbeddedSignUpFlowStatus$1, EmbeddedSignUpFlowType, FetchHttpClient, FieldType, FieldType as FieldType$1, FlowMetaType, ThunderIDBrowserClient, ThunderIDError, ThunderIDRuntimeError, ThunderIDRuntimeError as ThunderIDRuntimeError$1, TranslationBundleConstants, WellKnownSchemaIds, arrayBufferToBase64url, base64urlToArrayBuffer, createClassObserver, createClassObserver as createClassObserver$1, createMediaQueryListener, createMediaQueryListener as createMediaQueryListener$1, createPackageComponentLogger, createPackageLogger, createTheme, deepMerge, detectThemeMode, detectThemeMode as detectThemeMode$1, executeEmbeddedSignInFlow, executeEmbeddedSignUpFlow, extractEmojiFromUri, extractUserClaimsFromIdToken, flattenUserSchema, generateFlattenedUserProfile, generateUserProfile, get, getActiveTheme, getDefaultI18nBundles, getFlowMeta, getSchemas, getScim2Me, getVendorPrefix, handleWebAuthnAuthentication, hasAuthParamsInUrl, hasAuthParamsInUrl as hasAuthParamsInUrl$1, hasCalledForThisInstanceInUrl, http, isEmojiUri, isEmpty, navigate, navigate as navigate$1, normalizeTranslations, resolveFlowTemplateLiterals, updateMeProfile, withVendorCSSClassPrefix } from "@thunderid/browser";
|
|
2
2
|
import { Fragment, computed, defineComponent, h, inject, nextTick, onBeforeUnmount, onMounted, onUnmounted, provide, readonly, ref, shallowReadonly, shallowRef, watch } from "vue";
|
|
3
3
|
import DOMPurify from "dompurify";
|
|
4
4
|
|
|
@@ -274,7 +274,6 @@ const createVueLogger = (component) => createPackageComponentLogger(PACKAGE_NAME
|
|
|
274
274
|
//#endregion
|
|
275
275
|
//#region src/providers/I18nProvider.ts
|
|
276
276
|
const logger$4 = createVueLogger("I18nProvider");
|
|
277
|
-
const DEFAULT_STORAGE_KEY = "thunderid-i18n-language";
|
|
278
277
|
const DEFAULT_URL_PARAM = "lang";
|
|
279
278
|
const deriveRootDomain = (hostname) => {
|
|
280
279
|
const parts = hostname.split(".");
|
|
@@ -339,14 +338,20 @@ const detectBrowserLanguage = () => {
|
|
|
339
338
|
};
|
|
340
339
|
const I18nProvider = defineComponent({
|
|
341
340
|
name: "I18nProvider",
|
|
342
|
-
props: {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
341
|
+
props: {
|
|
342
|
+
preferences: {
|
|
343
|
+
default: void 0,
|
|
344
|
+
type: Object
|
|
345
|
+
},
|
|
346
|
+
vendor: {
|
|
347
|
+
default: void 0,
|
|
348
|
+
type: String
|
|
349
|
+
}
|
|
350
|
+
},
|
|
346
351
|
setup(props, { slots }) {
|
|
347
352
|
const defaultBundles = getDefaultI18nBundles();
|
|
348
353
|
const storageStrategy = props.preferences?.storageStrategy ?? "cookie";
|
|
349
|
-
const storageKey = props.preferences?.storageKey ??
|
|
354
|
+
const storageKey = props.preferences?.storageKey ?? `${getVendorPrefix(props.vendor)}-i18n-language`;
|
|
350
355
|
const urlParamConfig = props.preferences?.urlParam === void 0 ? DEFAULT_URL_PARAM : props.preferences.urlParam;
|
|
351
356
|
const storage = createStorageAdapter(storageStrategy, storageKey, storageStrategy === "cookie" ? props.preferences?.cookieDomain ?? (typeof window !== "undefined" ? deriveRootDomain(window.location.hostname) : void 0) : void 0);
|
|
352
357
|
const determineInitialLanguage = () => {
|
|
@@ -748,12 +753,8 @@ var ThunderIDVueClient = class extends ThunderIDBrowserClient {
|
|
|
748
753
|
const configData = await this.getStorageManager().getConfigData();
|
|
749
754
|
const firstArg = args[0];
|
|
750
755
|
const baseUrl = configData?.baseUrl || "";
|
|
751
|
-
const authIdFromUrl = new URL(window.location.href).searchParams.get("authId");
|
|
752
|
-
const authIdFromStorage = await this.getStorageManager().getHybridDataParameter("authId");
|
|
753
|
-
const authId = authIdFromUrl || authIdFromStorage || "";
|
|
754
|
-
if (authIdFromUrl && !authIdFromStorage) await this.getStorageManager().setHybridDataParameter("authId", authIdFromUrl);
|
|
755
756
|
const response = await executeEmbeddedSignUpFlow({
|
|
756
|
-
authId,
|
|
757
|
+
authId: new URL(window.location.href).searchParams.get("authId") ?? "",
|
|
757
758
|
baseUrl,
|
|
758
759
|
payload: typeof firstArg === "object" && "flowType" in firstArg ? {
|
|
759
760
|
...firstArg,
|
|
@@ -881,10 +882,15 @@ const ThunderIDProvider = defineComponent({
|
|
|
881
882
|
syncSession: {
|
|
882
883
|
default: void 0,
|
|
883
884
|
type: Boolean
|
|
885
|
+
},
|
|
886
|
+
vendor: {
|
|
887
|
+
default: void 0,
|
|
888
|
+
type: String
|
|
884
889
|
}
|
|
885
890
|
},
|
|
886
891
|
setup(props, { slots }) {
|
|
887
892
|
const client = new ThunderIDVueClient_default(props.instanceId);
|
|
893
|
+
const vendor = getVendorPrefix(props.vendor);
|
|
888
894
|
const isSignedIn = ref(false);
|
|
889
895
|
const isInitialized = ref(false);
|
|
890
896
|
const isLoading = ref(true);
|
|
@@ -908,7 +914,8 @@ const ThunderIDProvider = defineComponent({
|
|
|
908
914
|
signInUrl: props.signInUrl,
|
|
909
915
|
signUpUrl: props.signUpUrl,
|
|
910
916
|
storage: props.storage,
|
|
911
|
-
syncSession: props.syncSession
|
|
917
|
+
syncSession: props.syncSession,
|
|
918
|
+
vendor
|
|
912
919
|
};
|
|
913
920
|
}
|
|
914
921
|
async function updateSession() {
|
|
@@ -1005,14 +1012,15 @@ const ThunderIDProvider = defineComponent({
|
|
|
1005
1012
|
signUp,
|
|
1006
1013
|
signUpUrl: props.signUpUrl,
|
|
1007
1014
|
storage: props.storage,
|
|
1008
|
-
user
|
|
1015
|
+
user,
|
|
1016
|
+
vendor
|
|
1009
1017
|
});
|
|
1010
1018
|
onMounted(async () => {
|
|
1011
1019
|
const config = buildConfig();
|
|
1012
1020
|
await client.initialize(config);
|
|
1013
1021
|
await client.getDiscoveryResponse();
|
|
1014
1022
|
const initializedConfig = await client.getConfiguration();
|
|
1015
|
-
if (initializedConfig?.baseUrl) sessionStorage.setItem(
|
|
1023
|
+
if (initializedConfig?.baseUrl) sessionStorage.setItem(`${vendor}_base_url`, initializedConfig.baseUrl);
|
|
1016
1024
|
try {
|
|
1017
1025
|
isInitialized.value = await client.isInitialized();
|
|
1018
1026
|
} catch {
|
|
@@ -1028,7 +1036,7 @@ const ThunderIDProvider = defineComponent({
|
|
|
1028
1036
|
const urlParams = currentUrl.searchParams;
|
|
1029
1037
|
const code = urlParams.get("code");
|
|
1030
1038
|
const executionIdFromUrl = urlParams.get("executionId");
|
|
1031
|
-
const storedExecutionId = sessionStorage.getItem(
|
|
1039
|
+
const storedExecutionId = sessionStorage.getItem(`${vendor}_execution_id`);
|
|
1032
1040
|
if (code && !executionIdFromUrl && !storedExecutionId) await signIn();
|
|
1033
1041
|
} catch (error) {
|
|
1034
1042
|
throw new ThunderIDRuntimeError$1(`Sign in failed: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`, "thunderid-signIn-Error", "vue", "An error occurred while trying to sign in.");
|
|
@@ -1060,7 +1068,7 @@ const ThunderIDProvider = defineComponent({
|
|
|
1060
1068
|
if (signInCheckInterval) clearInterval(signInCheckInterval);
|
|
1061
1069
|
if (loadingCheckInterval) clearInterval(loadingCheckInterval);
|
|
1062
1070
|
});
|
|
1063
|
-
return () => h(I18nProvider_default,
|
|
1071
|
+
return () => h(I18nProvider_default, { vendor }, { default: () => h(FlowMetaProvider_default, { enabled: true }, { default: () => h(ThemeProvider_default, null, { default: () => h(FlowProvider_default, null, { default: () => h(UserProvider_default, {
|
|
1064
1072
|
onUpdateProfile: (updatedUser) => {
|
|
1065
1073
|
user.value = updatedUser;
|
|
1066
1074
|
userProfile.value = {
|
|
@@ -3581,7 +3589,6 @@ var Typography_css_default = TYPOGRAPHY_CSS;
|
|
|
3581
3589
|
|
|
3582
3590
|
//#endregion
|
|
3583
3591
|
//#region src/styles/injectStyles.ts
|
|
3584
|
-
const STYLE_ID = "thunderid-vue-styles";
|
|
3585
3592
|
/**
|
|
3586
3593
|
* Assembled CSS for all ThunderID Vue components.
|
|
3587
3594
|
* Order is intentional:
|
|
@@ -3612,12 +3619,16 @@ const STYLES = [
|
|
|
3612
3619
|
/**
|
|
3613
3620
|
* Injects ThunderID Vue component styles into the document `<head>` once.
|
|
3614
3621
|
* Subsequent calls are no-ops (idempotent).
|
|
3622
|
+
*
|
|
3623
|
+
* @param vendor - Vendor/brand namespace used to derive the dedupe `<style>` element id
|
|
3624
|
+
* (e.g. `${vendor}-vue-styles`). Defaults to `VendorConstants.VENDOR_PREFIX`.
|
|
3615
3625
|
*/
|
|
3616
|
-
function injectStyles() {
|
|
3626
|
+
function injectStyles(vendor) {
|
|
3617
3627
|
if (typeof document === "undefined") return;
|
|
3618
|
-
|
|
3628
|
+
const styleId = `${getVendorPrefix(vendor)}-vue-styles`;
|
|
3629
|
+
if (document.getElementById(styleId)) return;
|
|
3619
3630
|
const style = document.createElement("style");
|
|
3620
|
-
style.id =
|
|
3631
|
+
style.id = styleId;
|
|
3621
3632
|
style.textContent = STYLES;
|
|
3622
3633
|
document.head.appendChild(style);
|
|
3623
3634
|
}
|
|
@@ -3651,7 +3662,7 @@ function injectStyles() {
|
|
|
3651
3662
|
* ```
|
|
3652
3663
|
*/
|
|
3653
3664
|
const ThunderIDPlugin = { install(app, options) {
|
|
3654
|
-
injectStyles();
|
|
3665
|
+
injectStyles(options?.vendor);
|
|
3655
3666
|
if (options?.mode === "delegated") return;
|
|
3656
3667
|
app.component("ThunderIDProvider", ThunderIDProvider_default);
|
|
3657
3668
|
} };
|
|
@@ -3999,6 +4010,7 @@ const Button = defineComponent({
|
|
|
3999
4010
|
attrs.class || ""
|
|
4000
4011
|
].filter(Boolean).join(" "),
|
|
4001
4012
|
disabled: props.disabled || props.loading,
|
|
4013
|
+
id: attrs["id"],
|
|
4002
4014
|
onClick: (e) => emit("click", e),
|
|
4003
4015
|
style: attrs.style,
|
|
4004
4016
|
type: props.type
|
|
@@ -4092,6 +4104,10 @@ const TextField = defineComponent({
|
|
|
4092
4104
|
default: void 0,
|
|
4093
4105
|
type: String
|
|
4094
4106
|
},
|
|
4107
|
+
id: {
|
|
4108
|
+
default: void 0,
|
|
4109
|
+
type: String
|
|
4110
|
+
},
|
|
4095
4111
|
label: {
|
|
4096
4112
|
default: void 0,
|
|
4097
4113
|
type: String
|
|
@@ -4136,14 +4152,14 @@ const TextField = defineComponent({
|
|
|
4136
4152
|
}, [
|
|
4137
4153
|
props.label ? h("label", {
|
|
4138
4154
|
class: withVendorCSSClassPrefix("text-field__label"),
|
|
4139
|
-
for: props.name
|
|
4155
|
+
for: props.id ?? props.name
|
|
4140
4156
|
}, [props.label, props.required ? h("span", { class: withVendorCSSClassPrefix("text-field__required") }, " *") : null]) : null,
|
|
4141
4157
|
h("input", {
|
|
4142
4158
|
autocomplete: props.autoComplete,
|
|
4143
4159
|
class: withVendorCSSClassPrefix("text-field__input"),
|
|
4144
4160
|
"data-testid": attrs["data-testid"],
|
|
4145
4161
|
disabled: props.disabled,
|
|
4146
|
-
id: props.name,
|
|
4162
|
+
id: props.id ?? props.name,
|
|
4147
4163
|
name: props.name,
|
|
4148
4164
|
onBlur: () => emit("blur"),
|
|
4149
4165
|
onInput: (e) => emit("update:modelValue", e.target.value),
|
|
@@ -5229,6 +5245,7 @@ const Callback = defineComponent({
|
|
|
5229
5245
|
}
|
|
5230
5246
|
},
|
|
5231
5247
|
setup(props) {
|
|
5248
|
+
const vendor = getVendorPrefix(inject(THUNDERID_KEY, null)?.vendor);
|
|
5232
5249
|
const navigate$2 = (path) => {
|
|
5233
5250
|
if (props.onNavigate) props.onNavigate(path);
|
|
5234
5251
|
else navigate$1(path);
|
|
@@ -5254,7 +5271,7 @@ const Callback = defineComponent({
|
|
|
5254
5271
|
return;
|
|
5255
5272
|
}
|
|
5256
5273
|
if (!state) throw new Error("Missing OAuth state parameter - possible security issue");
|
|
5257
|
-
const storedData = sessionStorage.getItem(
|
|
5274
|
+
const storedData = sessionStorage.getItem(`${vendor}_oauth_${state}`);
|
|
5258
5275
|
if (!storedData) {
|
|
5259
5276
|
if (oauthError) {
|
|
5260
5277
|
const errorMsg = errorDescription || oauthError || "OAuth authentication failed";
|
|
@@ -5271,10 +5288,10 @@ const Callback = defineComponent({
|
|
|
5271
5288
|
const { path, timestamp } = JSON.parse(storedData);
|
|
5272
5289
|
returnPath = path || "/";
|
|
5273
5290
|
if (Date.now() - timestamp > 3e5) {
|
|
5274
|
-
sessionStorage.removeItem(
|
|
5291
|
+
sessionStorage.removeItem(`${vendor}_oauth_${state}`);
|
|
5275
5292
|
throw new Error("OAuth state expired - please try again");
|
|
5276
5293
|
}
|
|
5277
|
-
sessionStorage.removeItem(
|
|
5294
|
+
sessionStorage.removeItem(`${vendor}_oauth_${state}`);
|
|
5278
5295
|
if (oauthError) {
|
|
5279
5296
|
const errorMsg = errorDescription || oauthError || "OAuth authentication failed";
|
|
5280
5297
|
const err = new Error(errorMsg);
|
|
@@ -6396,13 +6413,14 @@ var BaseSignIn_default = BaseSignIn;
|
|
|
6396
6413
|
* Generates random state, stores return path in sessionStorage, and redirects to OAuth provider.
|
|
6397
6414
|
*
|
|
6398
6415
|
* @param redirectURL - OAuth authorization URL from the server
|
|
6416
|
+
* @param vendor - Vendor/brand namespace used to prefix the sessionStorage key. Defaults to `'thunderid'`.
|
|
6399
6417
|
*/
|
|
6400
|
-
function initiateOAuthRedirect(redirectURL) {
|
|
6418
|
+
function initiateOAuthRedirect(redirectURL, vendor) {
|
|
6401
6419
|
const basePath = document.querySelector("base")?.getAttribute("href") || "";
|
|
6402
6420
|
let returnPath = window.location.pathname;
|
|
6403
6421
|
if (basePath && returnPath.startsWith(basePath)) returnPath = returnPath.slice(basePath.length) || "/";
|
|
6404
6422
|
const state = crypto.randomUUID();
|
|
6405
|
-
sessionStorage.setItem(
|
|
6423
|
+
sessionStorage.setItem(`${getVendorPrefix(vendor)}_oauth_${state}`, JSON.stringify({
|
|
6406
6424
|
path: returnPath,
|
|
6407
6425
|
timestamp: Date.now()
|
|
6408
6426
|
}));
|
|
@@ -6499,7 +6517,6 @@ const handlePasskeyAuthentication = async (challengeData) => {
|
|
|
6499
6517
|
|
|
6500
6518
|
//#endregion
|
|
6501
6519
|
//#region src/components/auth/sign-in/SignIn.ts
|
|
6502
|
-
const EXECUTION_ID_STORAGE_KEY = "thunderid_execution_id";
|
|
6503
6520
|
/**
|
|
6504
6521
|
* SignIn — app-native sign-in component with full flow lifecycle management.
|
|
6505
6522
|
*
|
|
@@ -6538,9 +6555,10 @@ const SignIn = defineComponent({
|
|
|
6538
6555
|
},
|
|
6539
6556
|
emits: ["error", "success"],
|
|
6540
6557
|
setup(props, { slots, emit, attrs }) {
|
|
6541
|
-
const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading: sdkLoading, scopes, getStorageManager } = useThunderID_default();
|
|
6558
|
+
const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading: sdkLoading, scopes, getStorageManager, vendor } = useThunderID_default();
|
|
6542
6559
|
const { meta: flowMeta } = useFlowMeta_default();
|
|
6543
6560
|
const { t } = useI18n_default();
|
|
6561
|
+
const executionIdStorageKey = `${vendor}_execution_id`;
|
|
6544
6562
|
const components = ref([]);
|
|
6545
6563
|
const additionalData = ref({});
|
|
6546
6564
|
const currentExecutionId = ref(null);
|
|
@@ -6561,8 +6579,8 @@ const SignIn = defineComponent({
|
|
|
6561
6579
|
let passkeyProcessed = false;
|
|
6562
6580
|
const persistExecutionId = (executionId) => {
|
|
6563
6581
|
currentExecutionId.value = executionId;
|
|
6564
|
-
if (executionId) sessionStorage.setItem(
|
|
6565
|
-
else sessionStorage.removeItem(
|
|
6582
|
+
if (executionId) sessionStorage.setItem(executionIdStorageKey, executionId);
|
|
6583
|
+
else sessionStorage.removeItem(executionIdStorageKey);
|
|
6566
6584
|
};
|
|
6567
6585
|
const clearFlowState = async () => {
|
|
6568
6586
|
persistExecutionId(null);
|
|
@@ -6642,7 +6660,7 @@ const SignIn = defineComponent({
|
|
|
6642
6660
|
const sm = getStorageManager();
|
|
6643
6661
|
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
6644
6662
|
}
|
|
6645
|
-
initiateOAuthRedirect(redirectURL);
|
|
6663
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
6646
6664
|
return;
|
|
6647
6665
|
}
|
|
6648
6666
|
}
|
|
@@ -6716,7 +6734,7 @@ const SignIn = defineComponent({
|
|
|
6716
6734
|
const sm = getStorageManager();
|
|
6717
6735
|
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
6718
6736
|
}
|
|
6719
|
-
initiateOAuthRedirect(redirectURL);
|
|
6737
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
6720
6738
|
return;
|
|
6721
6739
|
}
|
|
6722
6740
|
}
|
|
@@ -6849,7 +6867,7 @@ const SignIn = defineComponent({
|
|
|
6849
6867
|
}, { deep: true });
|
|
6850
6868
|
useOAuthCallback({
|
|
6851
6869
|
currentFlowId: currentExecutionId,
|
|
6852
|
-
flowIdStorageKey:
|
|
6870
|
+
flowIdStorageKey: executionIdStorageKey,
|
|
6853
6871
|
isInitialized,
|
|
6854
6872
|
isSubmitting,
|
|
6855
6873
|
onError: (err) => {
|
|
@@ -7362,8 +7380,10 @@ const BaseSignUp = defineComponent({
|
|
|
7362
7380
|
}
|
|
7363
7381
|
}, { deep: true });
|
|
7364
7382
|
watch(() => [props.isInitialized, isFlowInitialized.value], ([initialized, flowInit]) => {
|
|
7365
|
-
|
|
7366
|
-
|
|
7383
|
+
if (typeof window !== "undefined") {
|
|
7384
|
+
const urlParams = new URL(window.location.href).searchParams;
|
|
7385
|
+
if (urlParams.get("code") || urlParams.get("state")) return;
|
|
7386
|
+
}
|
|
7367
7387
|
if (initialized && !flowInit && !initializationAttempted) {
|
|
7368
7388
|
initializationAttempted = true;
|
|
7369
7389
|
(async () => {
|
|
@@ -8590,6 +8610,8 @@ const BaseAcceptInvite = defineComponent({
|
|
|
8590
8610
|
setup(props, { slots }) {
|
|
8591
8611
|
const { meta: metaRef } = useFlowMeta_default();
|
|
8592
8612
|
const { t } = useI18n_default();
|
|
8613
|
+
const vendor = getVendorPrefix(inject(THUNDERID_KEY, null)?.vendor);
|
|
8614
|
+
const flowIdStorageKey = `${vendor}_flow_id`;
|
|
8593
8615
|
const isLoading = ref(false);
|
|
8594
8616
|
const isValidatingToken = ref(true);
|
|
8595
8617
|
const isTokenInvalid = ref(false);
|
|
@@ -8627,6 +8649,7 @@ const BaseAcceptInvite = defineComponent({
|
|
|
8627
8649
|
};
|
|
8628
8650
|
useOAuthCallback({
|
|
8629
8651
|
currentFlowId: ref(props.flowId ?? null),
|
|
8652
|
+
flowIdStorageKey,
|
|
8630
8653
|
isInitialized: ref(true),
|
|
8631
8654
|
onComplete: () => {
|
|
8632
8655
|
isComplete.value = true;
|
|
@@ -8719,7 +8742,7 @@ const BaseAcceptInvite = defineComponent({
|
|
|
8719
8742
|
if (response.type === "REDIRECTION") {
|
|
8720
8743
|
const redirectURL = response.data?.redirectURL || response?.redirectURL;
|
|
8721
8744
|
if (redirectURL) {
|
|
8722
|
-
initiateOAuthRedirect(redirectURL);
|
|
8745
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
8723
8746
|
return;
|
|
8724
8747
|
}
|
|
8725
8748
|
}
|
|
@@ -8760,7 +8783,7 @@ const BaseAcceptInvite = defineComponent({
|
|
|
8760
8783
|
isValidatingToken.value = true;
|
|
8761
8784
|
apiError.value = null;
|
|
8762
8785
|
try {
|
|
8763
|
-
if (flowId) sessionStorage.setItem(
|
|
8786
|
+
if (flowId) sessionStorage.setItem(flowIdStorageKey, flowId);
|
|
8764
8787
|
const payload = {
|
|
8765
8788
|
flowId,
|
|
8766
8789
|
inputs: { inviteToken },
|
|
@@ -69,6 +69,11 @@ export interface ThunderIDContext {
|
|
|
69
69
|
storage: ThunderIDVueConfig['storage'] | undefined;
|
|
70
70
|
/** The current user object, or `null` if not signed in. */
|
|
71
71
|
user: Readonly<Ref<any | null>>;
|
|
72
|
+
/**
|
|
73
|
+
* Vendor/brand namespace used to prefix storage keys, cookie names, and CSS class names.
|
|
74
|
+
* Resolved from the `vendor` config option, defaulting to `VendorConstants.VENDOR_PREFIX`.
|
|
75
|
+
*/
|
|
76
|
+
vendor: string;
|
|
72
77
|
}
|
|
73
78
|
/**
|
|
74
79
|
* Shape of the User context exposed by `useUser()`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../src/models/contexts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,MAAM,EACN,aAAa,EACb,cAAc,EACd,KAAK,EACL,0BAA0B,EAC1B,aAAa,EACb,qBAAqB,EACrB,IAAI,EACJ,WAAW,EACX,UAAU,EACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4CAA4C;IAC5C,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,oDAAoD;IACpD,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,4CAA4C;IAC5C,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACvC,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,8DAA8D;IAC9D,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IAEtC,aAAa,EAA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,MAAM,CAAC;IACzB;;;OAGG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC7D,mCAAmC;IACnC,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,sDAAsD;IACtD,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;CACtE"}
|
|
@@ -40,6 +40,11 @@ export interface ThunderIDPluginOptions {
|
|
|
40
40
|
* initialisation so it is safe to call during SSR.
|
|
41
41
|
*/
|
|
42
42
|
mode?: 'browser' | 'delegated';
|
|
43
|
+
/**
|
|
44
|
+
* Vendor/brand namespace used to prefix the injected `<style>` element's dedupe id.
|
|
45
|
+
* Should match the `vendor` passed to `<ThunderIDProvider>`. Defaults to `VendorConstants.VENDOR_PREFIX`.
|
|
46
|
+
*/
|
|
47
|
+
vendor?: string;
|
|
43
48
|
}
|
|
44
49
|
/**
|
|
45
50
|
* Vue plugin for ThunderID authentication.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThunderIDPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/ThunderIDPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAM,MAAM,EAAC,MAAM,KAAK,CAAC;AAIrC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"ThunderIDPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/ThunderIDPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAM,MAAM,EAAC,MAAM,KAAK,CAAC;AAIrC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAE/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,eAAe,EAAE,MAAM,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAYtD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"I18nProvider.d.ts","sourceRoot":"","sources":["../../src/providers/I18nProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"I18nProvider.d.ts","sourceRoot":"","sources":["../../src/providers/I18nProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAaH,OAAO,EAQL,KAAK,SAAS,EAKf,MAAM,KAAK,CAAC;AA6Gb,QAAA,MAAM,YAAY,EAAE,SAoLlB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThunderIDProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ThunderIDProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"ThunderIDProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ThunderIDProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAiBH,OAAO,EACL,KAAK,SAAS,EAaf,MAAM,KAAK,CAAC;AAyCb;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,iBAAiB,EAAE,SA2ZvB,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
/**
|
|
19
19
|
* Injects ThunderID Vue component styles into the document `<head>` once.
|
|
20
20
|
* Subsequent calls are no-ops (idempotent).
|
|
21
|
+
*
|
|
22
|
+
* @param vendor - Vendor/brand namespace used to derive the dedupe `<style>` element id
|
|
23
|
+
* (e.g. `${vendor}-vue-styles`). Defaults to `VendorConstants.VENDOR_PREFIX`.
|
|
21
24
|
*/
|
|
22
|
-
export declare function injectStyles(): void;
|
|
25
|
+
export declare function injectStyles(vendor?: string): void;
|
|
23
26
|
export default injectStyles;
|
|
24
27
|
//# sourceMappingURL=injectStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"injectStyles.d.ts","sourceRoot":"","sources":["../../src/styles/injectStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"injectStyles.d.ts","sourceRoot":"","sources":["../../src/styles/injectStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA2EH;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAWlD;AAED,eAAe,YAAY,CAAC"}
|
package/dist/utils/oauth.d.ts
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* Generates random state, stores return path in sessionStorage, and redirects to OAuth provider.
|
|
21
21
|
*
|
|
22
22
|
* @param redirectURL - OAuth authorization URL from the server
|
|
23
|
+
* @param vendor - Vendor/brand namespace used to prefix the sessionStorage key. Defaults to `'thunderid'`.
|
|
23
24
|
*/
|
|
24
|
-
export declare function initiateOAuthRedirect(redirectURL: string): void;
|
|
25
|
+
export declare function initiateOAuthRedirect(redirectURL: string, vendor?: string): void;
|
|
25
26
|
//# sourceMappingURL=oauth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/utils/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/utils/oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAsBhF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thunderid/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Vue SDK for ThunderID",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"thunderid",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"dompurify": "3.4.11",
|
|
60
60
|
"tslib": "2.8.1",
|
|
61
|
-
"@thunderid/browser": "^0.
|
|
61
|
+
"@thunderid/browser": "^0.5.0"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|