@thunderid/vue 0.4.0 → 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/cjs/index.cjs +50 -30
- 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/presentation/accept-invite/BaseAcceptInvite.d.ts.map +1 -1
- package/dist/index.js +51 -31
- 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
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 = () => {
|
|
@@ -903,10 +908,15 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
903
908
|
syncSession: {
|
|
904
909
|
default: void 0,
|
|
905
910
|
type: Boolean
|
|
911
|
+
},
|
|
912
|
+
vendor: {
|
|
913
|
+
default: void 0,
|
|
914
|
+
type: String
|
|
906
915
|
}
|
|
907
916
|
},
|
|
908
917
|
setup(props, { slots }) {
|
|
909
918
|
const client = new ThunderIDVueClient_default(props.instanceId);
|
|
919
|
+
const vendor = (0, __thunderid_browser.getVendorPrefix)(props.vendor);
|
|
910
920
|
const isSignedIn = (0, vue.ref)(false);
|
|
911
921
|
const isInitialized = (0, vue.ref)(false);
|
|
912
922
|
const isLoading = (0, vue.ref)(true);
|
|
@@ -930,7 +940,8 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
930
940
|
signInUrl: props.signInUrl,
|
|
931
941
|
signUpUrl: props.signUpUrl,
|
|
932
942
|
storage: props.storage,
|
|
933
|
-
syncSession: props.syncSession
|
|
943
|
+
syncSession: props.syncSession,
|
|
944
|
+
vendor
|
|
934
945
|
};
|
|
935
946
|
}
|
|
936
947
|
async function updateSession() {
|
|
@@ -1027,14 +1038,15 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
1027
1038
|
signUp,
|
|
1028
1039
|
signUpUrl: props.signUpUrl,
|
|
1029
1040
|
storage: props.storage,
|
|
1030
|
-
user
|
|
1041
|
+
user,
|
|
1042
|
+
vendor
|
|
1031
1043
|
});
|
|
1032
1044
|
(0, vue.onMounted)(async () => {
|
|
1033
1045
|
const config = buildConfig();
|
|
1034
1046
|
await client.initialize(config);
|
|
1035
1047
|
await client.getDiscoveryResponse();
|
|
1036
1048
|
const initializedConfig = await client.getConfiguration();
|
|
1037
|
-
if (initializedConfig?.baseUrl) sessionStorage.setItem(
|
|
1049
|
+
if (initializedConfig?.baseUrl) sessionStorage.setItem(`${vendor}_base_url`, initializedConfig.baseUrl);
|
|
1038
1050
|
try {
|
|
1039
1051
|
isInitialized.value = await client.isInitialized();
|
|
1040
1052
|
} catch {
|
|
@@ -1050,7 +1062,7 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
1050
1062
|
const urlParams = currentUrl.searchParams;
|
|
1051
1063
|
const code = urlParams.get("code");
|
|
1052
1064
|
const executionIdFromUrl = urlParams.get("executionId");
|
|
1053
|
-
const storedExecutionId = sessionStorage.getItem(
|
|
1065
|
+
const storedExecutionId = sessionStorage.getItem(`${vendor}_execution_id`);
|
|
1054
1066
|
if (code && !executionIdFromUrl && !storedExecutionId) await signIn();
|
|
1055
1067
|
} catch (error) {
|
|
1056
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.");
|
|
@@ -1082,7 +1094,7 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
1082
1094
|
if (signInCheckInterval) clearInterval(signInCheckInterval);
|
|
1083
1095
|
if (loadingCheckInterval) clearInterval(loadingCheckInterval);
|
|
1084
1096
|
});
|
|
1085
|
-
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, {
|
|
1086
1098
|
onUpdateProfile: (updatedUser) => {
|
|
1087
1099
|
user.value = updatedUser;
|
|
1088
1100
|
userProfile.value = {
|
|
@@ -3603,7 +3615,6 @@ var Typography_css_default = TYPOGRAPHY_CSS;
|
|
|
3603
3615
|
|
|
3604
3616
|
//#endregion
|
|
3605
3617
|
//#region src/styles/injectStyles.ts
|
|
3606
|
-
const STYLE_ID = "thunderid-vue-styles";
|
|
3607
3618
|
/**
|
|
3608
3619
|
* Assembled CSS for all ThunderID Vue components.
|
|
3609
3620
|
* Order is intentional:
|
|
@@ -3634,12 +3645,16 @@ const STYLES = [
|
|
|
3634
3645
|
/**
|
|
3635
3646
|
* Injects ThunderID Vue component styles into the document `<head>` once.
|
|
3636
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`.
|
|
3637
3651
|
*/
|
|
3638
|
-
function injectStyles() {
|
|
3652
|
+
function injectStyles(vendor) {
|
|
3639
3653
|
if (typeof document === "undefined") return;
|
|
3640
|
-
|
|
3654
|
+
const styleId = `${(0, __thunderid_browser.getVendorPrefix)(vendor)}-vue-styles`;
|
|
3655
|
+
if (document.getElementById(styleId)) return;
|
|
3641
3656
|
const style = document.createElement("style");
|
|
3642
|
-
style.id =
|
|
3657
|
+
style.id = styleId;
|
|
3643
3658
|
style.textContent = STYLES;
|
|
3644
3659
|
document.head.appendChild(style);
|
|
3645
3660
|
}
|
|
@@ -3673,7 +3688,7 @@ function injectStyles() {
|
|
|
3673
3688
|
* ```
|
|
3674
3689
|
*/
|
|
3675
3690
|
const ThunderIDPlugin = { install(app, options) {
|
|
3676
|
-
injectStyles();
|
|
3691
|
+
injectStyles(options?.vendor);
|
|
3677
3692
|
if (options?.mode === "delegated") return;
|
|
3678
3693
|
app.component("ThunderIDProvider", ThunderIDProvider_default);
|
|
3679
3694
|
} };
|
|
@@ -5256,6 +5271,7 @@ const Callback = (0, vue.defineComponent)({
|
|
|
5256
5271
|
}
|
|
5257
5272
|
},
|
|
5258
5273
|
setup(props) {
|
|
5274
|
+
const vendor = (0, __thunderid_browser.getVendorPrefix)((0, vue.inject)(THUNDERID_KEY, null)?.vendor);
|
|
5259
5275
|
const navigate$4 = (path) => {
|
|
5260
5276
|
if (props.onNavigate) props.onNavigate(path);
|
|
5261
5277
|
else (0, __thunderid_browser.navigate)(path);
|
|
@@ -5281,7 +5297,7 @@ const Callback = (0, vue.defineComponent)({
|
|
|
5281
5297
|
return;
|
|
5282
5298
|
}
|
|
5283
5299
|
if (!state) throw new Error("Missing OAuth state parameter - possible security issue");
|
|
5284
|
-
const storedData = sessionStorage.getItem(
|
|
5300
|
+
const storedData = sessionStorage.getItem(`${vendor}_oauth_${state}`);
|
|
5285
5301
|
if (!storedData) {
|
|
5286
5302
|
if (oauthError) {
|
|
5287
5303
|
const errorMsg = errorDescription || oauthError || "OAuth authentication failed";
|
|
@@ -5298,10 +5314,10 @@ const Callback = (0, vue.defineComponent)({
|
|
|
5298
5314
|
const { path, timestamp } = JSON.parse(storedData);
|
|
5299
5315
|
returnPath = path || "/";
|
|
5300
5316
|
if (Date.now() - timestamp > 3e5) {
|
|
5301
|
-
sessionStorage.removeItem(
|
|
5317
|
+
sessionStorage.removeItem(`${vendor}_oauth_${state}`);
|
|
5302
5318
|
throw new Error("OAuth state expired - please try again");
|
|
5303
5319
|
}
|
|
5304
|
-
sessionStorage.removeItem(
|
|
5320
|
+
sessionStorage.removeItem(`${vendor}_oauth_${state}`);
|
|
5305
5321
|
if (oauthError) {
|
|
5306
5322
|
const errorMsg = errorDescription || oauthError || "OAuth authentication failed";
|
|
5307
5323
|
const err = new Error(errorMsg);
|
|
@@ -6423,13 +6439,14 @@ var BaseSignIn_default = BaseSignIn;
|
|
|
6423
6439
|
* Generates random state, stores return path in sessionStorage, and redirects to OAuth provider.
|
|
6424
6440
|
*
|
|
6425
6441
|
* @param redirectURL - OAuth authorization URL from the server
|
|
6442
|
+
* @param vendor - Vendor/brand namespace used to prefix the sessionStorage key. Defaults to `'thunderid'`.
|
|
6426
6443
|
*/
|
|
6427
|
-
function initiateOAuthRedirect(redirectURL) {
|
|
6444
|
+
function initiateOAuthRedirect(redirectURL, vendor) {
|
|
6428
6445
|
const basePath = document.querySelector("base")?.getAttribute("href") || "";
|
|
6429
6446
|
let returnPath = window.location.pathname;
|
|
6430
6447
|
if (basePath && returnPath.startsWith(basePath)) returnPath = returnPath.slice(basePath.length) || "/";
|
|
6431
6448
|
const state = crypto.randomUUID();
|
|
6432
|
-
sessionStorage.setItem(
|
|
6449
|
+
sessionStorage.setItem(`${(0, __thunderid_browser.getVendorPrefix)(vendor)}_oauth_${state}`, JSON.stringify({
|
|
6433
6450
|
path: returnPath,
|
|
6434
6451
|
timestamp: Date.now()
|
|
6435
6452
|
}));
|
|
@@ -6526,7 +6543,6 @@ const handlePasskeyAuthentication = async (challengeData) => {
|
|
|
6526
6543
|
|
|
6527
6544
|
//#endregion
|
|
6528
6545
|
//#region src/components/auth/sign-in/SignIn.ts
|
|
6529
|
-
const EXECUTION_ID_STORAGE_KEY = "thunderid_execution_id";
|
|
6530
6546
|
/**
|
|
6531
6547
|
* SignIn — app-native sign-in component with full flow lifecycle management.
|
|
6532
6548
|
*
|
|
@@ -6565,9 +6581,10 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
6565
6581
|
},
|
|
6566
6582
|
emits: ["error", "success"],
|
|
6567
6583
|
setup(props, { slots, emit, attrs }) {
|
|
6568
|
-
const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading: sdkLoading, scopes, getStorageManager } = useThunderID_default();
|
|
6584
|
+
const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading: sdkLoading, scopes, getStorageManager, vendor } = useThunderID_default();
|
|
6569
6585
|
const { meta: flowMeta } = useFlowMeta_default();
|
|
6570
6586
|
const { t } = useI18n_default();
|
|
6587
|
+
const executionIdStorageKey = `${vendor}_execution_id`;
|
|
6571
6588
|
const components = (0, vue.ref)([]);
|
|
6572
6589
|
const additionalData = (0, vue.ref)({});
|
|
6573
6590
|
const currentExecutionId = (0, vue.ref)(null);
|
|
@@ -6588,8 +6605,8 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
6588
6605
|
let passkeyProcessed = false;
|
|
6589
6606
|
const persistExecutionId = (executionId) => {
|
|
6590
6607
|
currentExecutionId.value = executionId;
|
|
6591
|
-
if (executionId) sessionStorage.setItem(
|
|
6592
|
-
else sessionStorage.removeItem(
|
|
6608
|
+
if (executionId) sessionStorage.setItem(executionIdStorageKey, executionId);
|
|
6609
|
+
else sessionStorage.removeItem(executionIdStorageKey);
|
|
6593
6610
|
};
|
|
6594
6611
|
const clearFlowState = async () => {
|
|
6595
6612
|
persistExecutionId(null);
|
|
@@ -6669,7 +6686,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
6669
6686
|
const sm = getStorageManager();
|
|
6670
6687
|
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
6671
6688
|
}
|
|
6672
|
-
initiateOAuthRedirect(redirectURL);
|
|
6689
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
6673
6690
|
return;
|
|
6674
6691
|
}
|
|
6675
6692
|
}
|
|
@@ -6743,7 +6760,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
6743
6760
|
const sm = getStorageManager();
|
|
6744
6761
|
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
6745
6762
|
}
|
|
6746
|
-
initiateOAuthRedirect(redirectURL);
|
|
6763
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
6747
6764
|
return;
|
|
6748
6765
|
}
|
|
6749
6766
|
}
|
|
@@ -6876,7 +6893,7 @@ const SignIn = (0, vue.defineComponent)({
|
|
|
6876
6893
|
}, { deep: true });
|
|
6877
6894
|
useOAuthCallback({
|
|
6878
6895
|
currentFlowId: currentExecutionId,
|
|
6879
|
-
flowIdStorageKey:
|
|
6896
|
+
flowIdStorageKey: executionIdStorageKey,
|
|
6880
6897
|
isInitialized,
|
|
6881
6898
|
isSubmitting,
|
|
6882
6899
|
onError: (err) => {
|
|
@@ -8619,6 +8636,8 @@ const BaseAcceptInvite = (0, vue.defineComponent)({
|
|
|
8619
8636
|
setup(props, { slots }) {
|
|
8620
8637
|
const { meta: metaRef } = useFlowMeta_default();
|
|
8621
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`;
|
|
8622
8641
|
const isLoading = (0, vue.ref)(false);
|
|
8623
8642
|
const isValidatingToken = (0, vue.ref)(true);
|
|
8624
8643
|
const isTokenInvalid = (0, vue.ref)(false);
|
|
@@ -8656,6 +8675,7 @@ const BaseAcceptInvite = (0, vue.defineComponent)({
|
|
|
8656
8675
|
};
|
|
8657
8676
|
useOAuthCallback({
|
|
8658
8677
|
currentFlowId: (0, vue.ref)(props.flowId ?? null),
|
|
8678
|
+
flowIdStorageKey,
|
|
8659
8679
|
isInitialized: (0, vue.ref)(true),
|
|
8660
8680
|
onComplete: () => {
|
|
8661
8681
|
isComplete.value = true;
|
|
@@ -8748,7 +8768,7 @@ const BaseAcceptInvite = (0, vue.defineComponent)({
|
|
|
8748
8768
|
if (response.type === "REDIRECTION") {
|
|
8749
8769
|
const redirectURL = response.data?.redirectURL || response?.redirectURL;
|
|
8750
8770
|
if (redirectURL) {
|
|
8751
|
-
initiateOAuthRedirect(redirectURL);
|
|
8771
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
8752
8772
|
return;
|
|
8753
8773
|
}
|
|
8754
8774
|
}
|
|
@@ -8789,7 +8809,7 @@ const BaseAcceptInvite = (0, vue.defineComponent)({
|
|
|
8789
8809
|
isValidatingToken.value = true;
|
|
8790
8810
|
apiError.value = null;
|
|
8791
8811
|
try {
|
|
8792
|
-
if (flowId) sessionStorage.setItem(
|
|
8812
|
+
if (flowId) sessionStorage.setItem(flowIdStorageKey, flowId);
|
|
8793
8813
|
const payload = {
|
|
8794
8814
|
flowId,
|
|
8795
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,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,SAmjBZ,CAAC;AAEH,eAAe,MAAM,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.d.ts","sourceRoot":"","sources":["../../../../src/components/presentation/accept-invite/BaseAcceptInvite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,EAA4C,MAAM,oBAAoB,CAAC;AACnG,OAAO,EACL,KAAK,SAAS,EAUf,MAAM,KAAK,CAAC;AAeb;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE;QACL,cAAc,CAAC,EAA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AC;AAEH,eAAe,gBAAgB,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 = () => {
|
|
@@ -877,10 +882,15 @@ const ThunderIDProvider = defineComponent({
|
|
|
877
882
|
syncSession: {
|
|
878
883
|
default: void 0,
|
|
879
884
|
type: Boolean
|
|
885
|
+
},
|
|
886
|
+
vendor: {
|
|
887
|
+
default: void 0,
|
|
888
|
+
type: String
|
|
880
889
|
}
|
|
881
890
|
},
|
|
882
891
|
setup(props, { slots }) {
|
|
883
892
|
const client = new ThunderIDVueClient_default(props.instanceId);
|
|
893
|
+
const vendor = getVendorPrefix(props.vendor);
|
|
884
894
|
const isSignedIn = ref(false);
|
|
885
895
|
const isInitialized = ref(false);
|
|
886
896
|
const isLoading = ref(true);
|
|
@@ -904,7 +914,8 @@ const ThunderIDProvider = defineComponent({
|
|
|
904
914
|
signInUrl: props.signInUrl,
|
|
905
915
|
signUpUrl: props.signUpUrl,
|
|
906
916
|
storage: props.storage,
|
|
907
|
-
syncSession: props.syncSession
|
|
917
|
+
syncSession: props.syncSession,
|
|
918
|
+
vendor
|
|
908
919
|
};
|
|
909
920
|
}
|
|
910
921
|
async function updateSession() {
|
|
@@ -1001,14 +1012,15 @@ const ThunderIDProvider = defineComponent({
|
|
|
1001
1012
|
signUp,
|
|
1002
1013
|
signUpUrl: props.signUpUrl,
|
|
1003
1014
|
storage: props.storage,
|
|
1004
|
-
user
|
|
1015
|
+
user,
|
|
1016
|
+
vendor
|
|
1005
1017
|
});
|
|
1006
1018
|
onMounted(async () => {
|
|
1007
1019
|
const config = buildConfig();
|
|
1008
1020
|
await client.initialize(config);
|
|
1009
1021
|
await client.getDiscoveryResponse();
|
|
1010
1022
|
const initializedConfig = await client.getConfiguration();
|
|
1011
|
-
if (initializedConfig?.baseUrl) sessionStorage.setItem(
|
|
1023
|
+
if (initializedConfig?.baseUrl) sessionStorage.setItem(`${vendor}_base_url`, initializedConfig.baseUrl);
|
|
1012
1024
|
try {
|
|
1013
1025
|
isInitialized.value = await client.isInitialized();
|
|
1014
1026
|
} catch {
|
|
@@ -1024,7 +1036,7 @@ const ThunderIDProvider = defineComponent({
|
|
|
1024
1036
|
const urlParams = currentUrl.searchParams;
|
|
1025
1037
|
const code = urlParams.get("code");
|
|
1026
1038
|
const executionIdFromUrl = urlParams.get("executionId");
|
|
1027
|
-
const storedExecutionId = sessionStorage.getItem(
|
|
1039
|
+
const storedExecutionId = sessionStorage.getItem(`${vendor}_execution_id`);
|
|
1028
1040
|
if (code && !executionIdFromUrl && !storedExecutionId) await signIn();
|
|
1029
1041
|
} catch (error) {
|
|
1030
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.");
|
|
@@ -1056,7 +1068,7 @@ const ThunderIDProvider = defineComponent({
|
|
|
1056
1068
|
if (signInCheckInterval) clearInterval(signInCheckInterval);
|
|
1057
1069
|
if (loadingCheckInterval) clearInterval(loadingCheckInterval);
|
|
1058
1070
|
});
|
|
1059
|
-
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, {
|
|
1060
1072
|
onUpdateProfile: (updatedUser) => {
|
|
1061
1073
|
user.value = updatedUser;
|
|
1062
1074
|
userProfile.value = {
|
|
@@ -3577,7 +3589,6 @@ var Typography_css_default = TYPOGRAPHY_CSS;
|
|
|
3577
3589
|
|
|
3578
3590
|
//#endregion
|
|
3579
3591
|
//#region src/styles/injectStyles.ts
|
|
3580
|
-
const STYLE_ID = "thunderid-vue-styles";
|
|
3581
3592
|
/**
|
|
3582
3593
|
* Assembled CSS for all ThunderID Vue components.
|
|
3583
3594
|
* Order is intentional:
|
|
@@ -3608,12 +3619,16 @@ const STYLES = [
|
|
|
3608
3619
|
/**
|
|
3609
3620
|
* Injects ThunderID Vue component styles into the document `<head>` once.
|
|
3610
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`.
|
|
3611
3625
|
*/
|
|
3612
|
-
function injectStyles() {
|
|
3626
|
+
function injectStyles(vendor) {
|
|
3613
3627
|
if (typeof document === "undefined") return;
|
|
3614
|
-
|
|
3628
|
+
const styleId = `${getVendorPrefix(vendor)}-vue-styles`;
|
|
3629
|
+
if (document.getElementById(styleId)) return;
|
|
3615
3630
|
const style = document.createElement("style");
|
|
3616
|
-
style.id =
|
|
3631
|
+
style.id = styleId;
|
|
3617
3632
|
style.textContent = STYLES;
|
|
3618
3633
|
document.head.appendChild(style);
|
|
3619
3634
|
}
|
|
@@ -3647,7 +3662,7 @@ function injectStyles() {
|
|
|
3647
3662
|
* ```
|
|
3648
3663
|
*/
|
|
3649
3664
|
const ThunderIDPlugin = { install(app, options) {
|
|
3650
|
-
injectStyles();
|
|
3665
|
+
injectStyles(options?.vendor);
|
|
3651
3666
|
if (options?.mode === "delegated") return;
|
|
3652
3667
|
app.component("ThunderIDProvider", ThunderIDProvider_default);
|
|
3653
3668
|
} };
|
|
@@ -5230,6 +5245,7 @@ const Callback = defineComponent({
|
|
|
5230
5245
|
}
|
|
5231
5246
|
},
|
|
5232
5247
|
setup(props) {
|
|
5248
|
+
const vendor = getVendorPrefix(inject(THUNDERID_KEY, null)?.vendor);
|
|
5233
5249
|
const navigate$2 = (path) => {
|
|
5234
5250
|
if (props.onNavigate) props.onNavigate(path);
|
|
5235
5251
|
else navigate$1(path);
|
|
@@ -5255,7 +5271,7 @@ const Callback = defineComponent({
|
|
|
5255
5271
|
return;
|
|
5256
5272
|
}
|
|
5257
5273
|
if (!state) throw new Error("Missing OAuth state parameter - possible security issue");
|
|
5258
|
-
const storedData = sessionStorage.getItem(
|
|
5274
|
+
const storedData = sessionStorage.getItem(`${vendor}_oauth_${state}`);
|
|
5259
5275
|
if (!storedData) {
|
|
5260
5276
|
if (oauthError) {
|
|
5261
5277
|
const errorMsg = errorDescription || oauthError || "OAuth authentication failed";
|
|
@@ -5272,10 +5288,10 @@ const Callback = defineComponent({
|
|
|
5272
5288
|
const { path, timestamp } = JSON.parse(storedData);
|
|
5273
5289
|
returnPath = path || "/";
|
|
5274
5290
|
if (Date.now() - timestamp > 3e5) {
|
|
5275
|
-
sessionStorage.removeItem(
|
|
5291
|
+
sessionStorage.removeItem(`${vendor}_oauth_${state}`);
|
|
5276
5292
|
throw new Error("OAuth state expired - please try again");
|
|
5277
5293
|
}
|
|
5278
|
-
sessionStorage.removeItem(
|
|
5294
|
+
sessionStorage.removeItem(`${vendor}_oauth_${state}`);
|
|
5279
5295
|
if (oauthError) {
|
|
5280
5296
|
const errorMsg = errorDescription || oauthError || "OAuth authentication failed";
|
|
5281
5297
|
const err = new Error(errorMsg);
|
|
@@ -6397,13 +6413,14 @@ var BaseSignIn_default = BaseSignIn;
|
|
|
6397
6413
|
* Generates random state, stores return path in sessionStorage, and redirects to OAuth provider.
|
|
6398
6414
|
*
|
|
6399
6415
|
* @param redirectURL - OAuth authorization URL from the server
|
|
6416
|
+
* @param vendor - Vendor/brand namespace used to prefix the sessionStorage key. Defaults to `'thunderid'`.
|
|
6400
6417
|
*/
|
|
6401
|
-
function initiateOAuthRedirect(redirectURL) {
|
|
6418
|
+
function initiateOAuthRedirect(redirectURL, vendor) {
|
|
6402
6419
|
const basePath = document.querySelector("base")?.getAttribute("href") || "";
|
|
6403
6420
|
let returnPath = window.location.pathname;
|
|
6404
6421
|
if (basePath && returnPath.startsWith(basePath)) returnPath = returnPath.slice(basePath.length) || "/";
|
|
6405
6422
|
const state = crypto.randomUUID();
|
|
6406
|
-
sessionStorage.setItem(
|
|
6423
|
+
sessionStorage.setItem(`${getVendorPrefix(vendor)}_oauth_${state}`, JSON.stringify({
|
|
6407
6424
|
path: returnPath,
|
|
6408
6425
|
timestamp: Date.now()
|
|
6409
6426
|
}));
|
|
@@ -6500,7 +6517,6 @@ const handlePasskeyAuthentication = async (challengeData) => {
|
|
|
6500
6517
|
|
|
6501
6518
|
//#endregion
|
|
6502
6519
|
//#region src/components/auth/sign-in/SignIn.ts
|
|
6503
|
-
const EXECUTION_ID_STORAGE_KEY = "thunderid_execution_id";
|
|
6504
6520
|
/**
|
|
6505
6521
|
* SignIn — app-native sign-in component with full flow lifecycle management.
|
|
6506
6522
|
*
|
|
@@ -6539,9 +6555,10 @@ const SignIn = defineComponent({
|
|
|
6539
6555
|
},
|
|
6540
6556
|
emits: ["error", "success"],
|
|
6541
6557
|
setup(props, { slots, emit, attrs }) {
|
|
6542
|
-
const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading: sdkLoading, scopes, getStorageManager } = useThunderID_default();
|
|
6558
|
+
const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading: sdkLoading, scopes, getStorageManager, vendor } = useThunderID_default();
|
|
6543
6559
|
const { meta: flowMeta } = useFlowMeta_default();
|
|
6544
6560
|
const { t } = useI18n_default();
|
|
6561
|
+
const executionIdStorageKey = `${vendor}_execution_id`;
|
|
6545
6562
|
const components = ref([]);
|
|
6546
6563
|
const additionalData = ref({});
|
|
6547
6564
|
const currentExecutionId = ref(null);
|
|
@@ -6562,8 +6579,8 @@ const SignIn = defineComponent({
|
|
|
6562
6579
|
let passkeyProcessed = false;
|
|
6563
6580
|
const persistExecutionId = (executionId) => {
|
|
6564
6581
|
currentExecutionId.value = executionId;
|
|
6565
|
-
if (executionId) sessionStorage.setItem(
|
|
6566
|
-
else sessionStorage.removeItem(
|
|
6582
|
+
if (executionId) sessionStorage.setItem(executionIdStorageKey, executionId);
|
|
6583
|
+
else sessionStorage.removeItem(executionIdStorageKey);
|
|
6567
6584
|
};
|
|
6568
6585
|
const clearFlowState = async () => {
|
|
6569
6586
|
persistExecutionId(null);
|
|
@@ -6643,7 +6660,7 @@ const SignIn = defineComponent({
|
|
|
6643
6660
|
const sm = getStorageManager();
|
|
6644
6661
|
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
6645
6662
|
}
|
|
6646
|
-
initiateOAuthRedirect(redirectURL);
|
|
6663
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
6647
6664
|
return;
|
|
6648
6665
|
}
|
|
6649
6666
|
}
|
|
@@ -6717,7 +6734,7 @@ const SignIn = defineComponent({
|
|
|
6717
6734
|
const sm = getStorageManager();
|
|
6718
6735
|
if (sm) await sm.setHybridDataParameter("authId", urlParams.authId);
|
|
6719
6736
|
}
|
|
6720
|
-
initiateOAuthRedirect(redirectURL);
|
|
6737
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
6721
6738
|
return;
|
|
6722
6739
|
}
|
|
6723
6740
|
}
|
|
@@ -6850,7 +6867,7 @@ const SignIn = defineComponent({
|
|
|
6850
6867
|
}, { deep: true });
|
|
6851
6868
|
useOAuthCallback({
|
|
6852
6869
|
currentFlowId: currentExecutionId,
|
|
6853
|
-
flowIdStorageKey:
|
|
6870
|
+
flowIdStorageKey: executionIdStorageKey,
|
|
6854
6871
|
isInitialized,
|
|
6855
6872
|
isSubmitting,
|
|
6856
6873
|
onError: (err) => {
|
|
@@ -8593,6 +8610,8 @@ const BaseAcceptInvite = defineComponent({
|
|
|
8593
8610
|
setup(props, { slots }) {
|
|
8594
8611
|
const { meta: metaRef } = useFlowMeta_default();
|
|
8595
8612
|
const { t } = useI18n_default();
|
|
8613
|
+
const vendor = getVendorPrefix(inject(THUNDERID_KEY, null)?.vendor);
|
|
8614
|
+
const flowIdStorageKey = `${vendor}_flow_id`;
|
|
8596
8615
|
const isLoading = ref(false);
|
|
8597
8616
|
const isValidatingToken = ref(true);
|
|
8598
8617
|
const isTokenInvalid = ref(false);
|
|
@@ -8630,6 +8649,7 @@ const BaseAcceptInvite = defineComponent({
|
|
|
8630
8649
|
};
|
|
8631
8650
|
useOAuthCallback({
|
|
8632
8651
|
currentFlowId: ref(props.flowId ?? null),
|
|
8652
|
+
flowIdStorageKey,
|
|
8633
8653
|
isInitialized: ref(true),
|
|
8634
8654
|
onComplete: () => {
|
|
8635
8655
|
isComplete.value = true;
|
|
@@ -8722,7 +8742,7 @@ const BaseAcceptInvite = defineComponent({
|
|
|
8722
8742
|
if (response.type === "REDIRECTION") {
|
|
8723
8743
|
const redirectURL = response.data?.redirectURL || response?.redirectURL;
|
|
8724
8744
|
if (redirectURL) {
|
|
8725
|
-
initiateOAuthRedirect(redirectURL);
|
|
8745
|
+
initiateOAuthRedirect(redirectURL, vendor);
|
|
8726
8746
|
return;
|
|
8727
8747
|
}
|
|
8728
8748
|
}
|
|
@@ -8763,7 +8783,7 @@ const BaseAcceptInvite = defineComponent({
|
|
|
8763
8783
|
isValidatingToken.value = true;
|
|
8764
8784
|
apiError.value = null;
|
|
8765
8785
|
try {
|
|
8766
|
-
if (flowId) sessionStorage.setItem(
|
|
8786
|
+
if (flowId) sessionStorage.setItem(flowIdStorageKey, flowId);
|
|
8767
8787
|
const payload = {
|
|
8768
8788
|
flowId,
|
|
8769
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,UAA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CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;IACxC,+DAA+D;IAC/D,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5B,0CAA0C;IAC1C,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAMD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACnD,iDAAiD;IACjD,eAAe,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACvC,kCAAkC;IAClC,gBAAgB,EAAE,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"
|