@asgardeo/react 0.21.4 → 0.22.1

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.js CHANGED
@@ -950,7 +950,7 @@ var AsgardeoReactClient = class extends import_browser6.AsgardeoBrowserClient {
950
950
  if (isV2Platform && typeof arg1 === "object" && arg1 !== null && arg1.callOnlyOnRedirect === true) {
951
951
  return void 0;
952
952
  }
953
- if (isV2Platform && typeof arg1 === "object" && arg1 !== null && !(0, import_browser6.isEmpty)(arg1) && ("flowId" in arg1 || "applicationId" in arg1)) {
953
+ if (isV2Platform && typeof arg1 === "object" && arg1 !== null && !(0, import_browser6.isEmpty)(arg1) && ("executionId" in arg1 || "applicationId" in arg1)) {
954
954
  const authIdFromUrl = new URL(window.location.href).searchParams.get("authId");
955
955
  const authIdFromStorage = sessionStorage.getItem("asgardeo_auth_id");
956
956
  const authId = authIdFromUrl || authIdFromStorage;
@@ -2250,7 +2250,7 @@ var AsgardeoProvider = ({
2250
2250
  }
2251
2251
  async function signIn(...args) {
2252
2252
  const arg1 = args[0];
2253
- const isV2FlowRequest = config.platform === import_browser16.Platform.AsgardeoV2 && typeof arg1 === "object" && arg1 !== null && ("flowId" in arg1 || "applicationId" in arg1);
2253
+ const isV2FlowRequest = config.platform === import_browser16.Platform.AsgardeoV2 && typeof arg1 === "object" && arg1 !== null && ("executionId" in arg1 || "applicationId" in arg1);
2254
2254
  try {
2255
2255
  if (!isV2FlowRequest) {
2256
2256
  setIsUpdatingSession(true);
@@ -2312,9 +2312,9 @@ var AsgardeoProvider = ({
2312
2312
  if (isV2Platform) {
2313
2313
  const urlParams = currentUrl.searchParams;
2314
2314
  const code = urlParams.get("code");
2315
- const flowIdFromUrl = urlParams.get("flowId");
2316
- const storedFlowId = sessionStorage.getItem("asgardeo_flow_id");
2317
- if (code && !flowIdFromUrl && !storedFlowId) {
2315
+ const executionIdFromUrl = urlParams.get("executionId");
2316
+ const storedExecutionId = sessionStorage.getItem("asgardeo_execution_id");
2317
+ if (code && !executionIdFromUrl && !storedExecutionId) {
2318
2318
  await signIn();
2319
2319
  }
2320
2320
  } else {
@@ -7923,7 +7923,7 @@ var normalizeFlowResponse = (response, t, options = {}, meta) => {
7923
7923
  return {
7924
7924
  additionalData,
7925
7925
  components: transformComponents(response, t, resolveTranslations, meta),
7926
- flowId: response.flowId
7926
+ executionId: response.executionId
7927
7927
  };
7928
7928
  };
7929
7929
 
@@ -9581,8 +9581,8 @@ function cleanupUrlParams() {
9581
9581
  window.history.replaceState({}, "", url.toString());
9582
9582
  }
9583
9583
  function useOAuthCallback({
9584
- currentFlowId,
9585
- flowIdStorageKey = "asgardeo_flow_id",
9584
+ currentExecutionId,
9585
+ executionIdStorageKey = "asgardeo_execution_id",
9586
9586
  isInitialized,
9587
9587
  isSubmitting = false,
9588
9588
  onComplete,
@@ -9591,7 +9591,7 @@ function useOAuthCallback({
9591
9591
  onProcessingStart,
9592
9592
  onSubmit,
9593
9593
  processedRef,
9594
- setFlowId,
9594
+ setExecutionId: setExecExecutionId,
9595
9595
  tokenValidationAttemptedRef
9596
9596
  }) {
9597
9597
  const internalRef = (0, import_react71.useRef)(false);
@@ -9604,7 +9604,7 @@ function useOAuthCallback({
9604
9604
  const code = urlParams.get("code");
9605
9605
  const nonce = urlParams.get("nonce");
9606
9606
  const state = urlParams.get("state");
9607
- const flowIdFromUrl = urlParams.get("flowId");
9607
+ const executionIdFromUrl = urlParams.get("executionId");
9608
9608
  const error = urlParams.get("error");
9609
9609
  const errorDescription = urlParams.get("error_description");
9610
9610
  if (error) {
@@ -9622,11 +9622,11 @@ function useOAuthCallback({
9622
9622
  if (tokenValidationAttemptedRef?.current) {
9623
9623
  return;
9624
9624
  }
9625
- const storedFlowId = sessionStorage.getItem(flowIdStorageKey);
9626
- const flowIdToUse = currentFlowId || storedFlowId || flowIdFromUrl || state || null;
9627
- if (!flowIdToUse) {
9625
+ const storedExecutionId = sessionStorage.getItem(executionIdStorageKey);
9626
+ const executionIdToUse = currentExecutionId || storedExecutionId || executionIdFromUrl || state || null;
9627
+ if (!executionIdToUse) {
9628
9628
  oauthCodeProcessedRef.current = true;
9629
- onError?.(new Error("Invalid flow. Missing flowId."));
9629
+ onError?.(new Error("Invalid flow. Missing executionId."));
9630
9630
  cleanupUrlParams();
9631
9631
  return;
9632
9632
  }
@@ -9635,13 +9635,13 @@ function useOAuthCallback({
9635
9635
  tokenValidationAttemptedRef.current = true;
9636
9636
  }
9637
9637
  onProcessingStart?.();
9638
- if (!currentFlowId && setFlowId) {
9639
- setFlowId(flowIdToUse);
9638
+ if (!currentExecutionId && setExecExecutionId) {
9639
+ setExecExecutionId(executionIdToUse);
9640
9640
  }
9641
9641
  (async () => {
9642
9642
  try {
9643
9643
  const payload = {
9644
- flowId: flowIdToUse,
9644
+ executionId: executionIdToUse,
9645
9645
  inputs: {
9646
9646
  code,
9647
9647
  ...nonce && { nonce }
@@ -9663,14 +9663,14 @@ function useOAuthCallback({
9663
9663
  })();
9664
9664
  }, [
9665
9665
  isInitialized,
9666
- currentFlowId,
9666
+ currentExecutionId,
9667
9667
  isSubmitting,
9668
9668
  onSubmit,
9669
9669
  onComplete,
9670
9670
  onError,
9671
9671
  onFlowChange,
9672
- setFlowId,
9673
- flowIdStorageKey
9672
+ setExecExecutionId,
9673
+ executionIdStorageKey
9674
9674
  ]);
9675
9675
  }
9676
9676
 
@@ -9856,7 +9856,7 @@ var SignIn = ({
9856
9856
  const { t } = useTranslation_default(preferences?.i18n);
9857
9857
  const [components, setComponents] = (0, import_react72.useState)([]);
9858
9858
  const [additionalData, setAdditionalData] = (0, import_react72.useState)({});
9859
- const [currentFlowId, setCurrentFlowId] = (0, import_react72.useState)(null);
9859
+ const [currentExecutionId, setCurrentExecutionId] = (0, import_react72.useState)(null);
9860
9860
  const [isFlowInitialized, setIsFlowInitialized] = (0, import_react72.useState)(false);
9861
9861
  const [flowError, setFlowError] = (0, import_react72.useState)(null);
9862
9862
  const [isSubmitting, setIsSubmitting] = (0, import_react72.useState)(false);
@@ -9866,22 +9866,22 @@ var SignIn = ({
9866
9866
  challenge: null,
9867
9867
  creationOptions: null,
9868
9868
  error: null,
9869
- flowId: null,
9869
+ executionId: null,
9870
9870
  isActive: false
9871
9871
  });
9872
9872
  const initializationAttemptedRef = (0, import_react72.useRef)(false);
9873
9873
  const oauthCodeProcessedRef = (0, import_react72.useRef)(false);
9874
9874
  const passkeyProcessedRef = (0, import_react72.useRef)(false);
9875
- const setFlowId = (flowId) => {
9876
- setCurrentFlowId(flowId);
9877
- if (flowId) {
9878
- sessionStorage.setItem("asgardeo_flow_id", flowId);
9875
+ const setExecutionId = (executionId) => {
9876
+ setCurrentExecutionId(executionId);
9877
+ if (executionId) {
9878
+ sessionStorage.setItem("asgardeo_execution_id", executionId);
9879
9879
  } else {
9880
- sessionStorage.removeItem("asgardeo_flow_id");
9880
+ sessionStorage.removeItem("asgardeo_execution_id");
9881
9881
  }
9882
9882
  };
9883
9883
  const clearFlowState = () => {
9884
- setFlowId(null);
9884
+ setExecutionId(null);
9885
9885
  setIsFlowInitialized(false);
9886
9886
  sessionStorage.removeItem("asgardeo_auth_id");
9887
9887
  setIsTimeoutDisabled(false);
@@ -9895,7 +9895,7 @@ var SignIn = ({
9895
9895
  code: urlParams.get("code"),
9896
9896
  error: urlParams.get("error"),
9897
9897
  errorDescription: urlParams.get("error_description"),
9898
- flowId: urlParams.get("flowId"),
9898
+ executionId: urlParams.get("executionId"),
9899
9899
  nonce: urlParams.get("nonce"),
9900
9900
  state: urlParams.get("state")
9901
9901
  };
@@ -9920,7 +9920,7 @@ var SignIn = ({
9920
9920
  const cleanupFlowUrlParams = () => {
9921
9921
  if (!window?.location?.href) return;
9922
9922
  const url = new URL(window.location.href);
9923
- url.searchParams.delete("flowId");
9923
+ url.searchParams.delete("executionId");
9924
9924
  url.searchParams.delete("authId");
9925
9925
  url.searchParams.delete("applicationId");
9926
9926
  window?.history?.replaceState({}, "", url.toString());
@@ -9941,8 +9941,8 @@ var SignIn = ({
9941
9941
  if (response.type === import_browser58.EmbeddedSignInFlowTypeV2.Redirection) {
9942
9942
  const redirectURL = response.data?.redirectURL || response?.redirectURL;
9943
9943
  if (redirectURL && window?.location) {
9944
- if (response.flowId) {
9945
- setFlowId(response.flowId);
9944
+ if (response.executionId) {
9945
+ setExecutionId(response.executionId);
9946
9946
  }
9947
9947
  const urlParams = getUrlParams2();
9948
9948
  handleAuthId(urlParams.authId);
@@ -9957,9 +9957,9 @@ var SignIn = ({
9957
9957
  oauthCodeProcessedRef.current = false;
9958
9958
  handleAuthId(urlParams.authId);
9959
9959
  const effectiveApplicationId = applicationId || urlParams.applicationId;
9960
- if (!urlParams.flowId && !effectiveApplicationId) {
9960
+ if (!urlParams.executionId && !effectiveApplicationId) {
9961
9961
  const error = new import_browser58.AsgardeoRuntimeError(
9962
- "Either flowId or applicationId is required for authentication",
9962
+ "Either executionId or applicationId is required for authentication",
9963
9963
  "SIGN_IN_ERROR",
9964
9964
  "react"
9965
9965
  );
@@ -9969,9 +9969,9 @@ var SignIn = ({
9969
9969
  try {
9970
9970
  setFlowError(null);
9971
9971
  let response;
9972
- if (urlParams.flowId) {
9972
+ if (urlParams.executionId) {
9973
9973
  response = await signIn({
9974
- flowId: urlParams.flowId
9974
+ executionId: urlParams.executionId
9975
9975
  });
9976
9976
  } else {
9977
9977
  response = await signIn({
@@ -9983,7 +9983,7 @@ var SignIn = ({
9983
9983
  return;
9984
9984
  }
9985
9985
  const {
9986
- flowId: normalizedFlowId,
9986
+ executionId: normalizedExecutionId,
9987
9987
  components: normalizedComponents,
9988
9988
  additionalData: normalizedAdditionalData
9989
9989
  } = normalizeFlowResponse(
@@ -9994,8 +9994,8 @@ var SignIn = ({
9994
9994
  },
9995
9995
  meta
9996
9996
  );
9997
- if (normalizedFlowId && normalizedComponents) {
9998
- setFlowId(normalizedFlowId);
9997
+ if (normalizedExecutionId && normalizedComponents) {
9998
+ setExecutionId(normalizedExecutionId);
9999
9999
  setComponents(normalizedComponents);
10000
10000
  setAdditionalData(normalizedAdditionalData ?? {});
10001
10001
  setIsFlowInitialized(true);
@@ -10020,11 +10020,11 @@ var SignIn = ({
10020
10020
  }, []);
10021
10021
  (0, import_react72.useEffect)(() => {
10022
10022
  const currentUrlParams = getUrlParams2();
10023
- if (isInitialized && !isLoading && !isFlowInitialized && !initializationAttemptedRef.current && !currentFlowId && !currentUrlParams.code && !currentUrlParams.state && !isSubmitting && !oauthCodeProcessedRef.current) {
10023
+ if (isInitialized && !isLoading && !isFlowInitialized && !initializationAttemptedRef.current && !currentExecutionId && !currentUrlParams.code && !currentUrlParams.state && !isSubmitting && !oauthCodeProcessedRef.current) {
10024
10024
  initializationAttemptedRef.current = true;
10025
10025
  initializeFlow();
10026
10026
  }
10027
- }, [isInitialized, isLoading, isFlowInitialized, currentFlowId]);
10027
+ }, [isInitialized, isLoading, isFlowInitialized, currentExecutionId]);
10028
10028
  (0, import_react72.useEffect)(() => {
10029
10029
  const timeoutMs = Number(additionalData?.["stepTimeout"]) || 0;
10030
10030
  if (timeoutMs <= 0 || !isFlowInitialized) {
@@ -10047,8 +10047,8 @@ var SignIn = ({
10047
10047
  return () => clearTimeout(timerId);
10048
10048
  }, [additionalData?.["stepTimeout"], isFlowInitialized, t]);
10049
10049
  const handleSubmit = async (payload) => {
10050
- const effectiveFlowId = payload.flowId || currentFlowId;
10051
- if (!effectiveFlowId) {
10050
+ const effectiveExecutionId = payload.executionId || currentExecutionId;
10051
+ if (!effectiveExecutionId) {
10052
10052
  throw new Error("No active flow ID");
10053
10053
  }
10054
10054
  const processedInputs = { ...payload.inputs };
@@ -10105,7 +10105,7 @@ var SignIn = ({
10105
10105
  setIsSubmitting(true);
10106
10106
  setFlowError(null);
10107
10107
  const response = await signIn({
10108
- flowId: effectiveFlowId,
10108
+ executionId: effectiveExecutionId,
10109
10109
  ...payload,
10110
10110
  inputs: processedInputs
10111
10111
  });
@@ -10114,21 +10114,21 @@ var SignIn = ({
10114
10114
  }
10115
10115
  if (response.data?.additionalData?.["passkeyChallenge"] || response.data?.additionalData?.["passkeyCreationOptions"]) {
10116
10116
  const { passkeyChallenge, passkeyCreationOptions } = response.data.additionalData;
10117
- const effectiveFlowIdForPasskey = response.flowId || effectiveFlowId;
10117
+ const effectiveExecutionIdForPasskey = response.executionId || effectiveExecutionId;
10118
10118
  passkeyProcessedRef.current = false;
10119
10119
  setPasskeyState({
10120
10120
  actionId: "submit",
10121
10121
  challenge: passkeyChallenge,
10122
10122
  creationOptions: passkeyCreationOptions,
10123
10123
  error: null,
10124
- flowId: effectiveFlowIdForPasskey,
10124
+ executionId: effectiveExecutionIdForPasskey,
10125
10125
  isActive: true
10126
10126
  });
10127
10127
  setIsSubmitting(false);
10128
10128
  return;
10129
10129
  }
10130
10130
  const {
10131
- flowId: normalizedFlowId,
10131
+ executionId: normalizedExecutionId,
10132
10132
  components: normalizedComponents,
10133
10133
  additionalData: normalizedAdditionalData
10134
10134
  } = normalizeFlowResponse(
@@ -10152,9 +10152,9 @@ var SignIn = ({
10152
10152
  const redirectUrl = response?.redirectUrl || response?.redirect_uri;
10153
10153
  const finalRedirectUrl = redirectUrl || afterSignInUrl;
10154
10154
  setIsSubmitting(false);
10155
- setFlowId(null);
10155
+ setExecutionId(null);
10156
10156
  setIsFlowInitialized(false);
10157
- sessionStorage.removeItem("asgardeo_flow_id");
10157
+ sessionStorage.removeItem("asgardeo_execution_id");
10158
10158
  sessionStorage.removeItem("asgardeo_auth_id");
10159
10159
  cleanupOAuthUrlParams(true);
10160
10160
  if (onSuccess) {
@@ -10168,8 +10168,8 @@ var SignIn = ({
10168
10168
  }
10169
10169
  return;
10170
10170
  }
10171
- if (normalizedFlowId && normalizedComponents) {
10172
- setFlowId(normalizedFlowId);
10171
+ if (normalizedExecutionId && normalizedComponents) {
10172
+ setExecutionId(normalizedExecutionId);
10173
10173
  setComponents(normalizedComponents);
10174
10174
  setAdditionalData(normalizedAdditionalData ?? {});
10175
10175
  setIsTimeoutDisabled(false);
@@ -10193,19 +10193,19 @@ var SignIn = ({
10193
10193
  setError(error);
10194
10194
  };
10195
10195
  useOAuthCallback({
10196
- currentFlowId,
10196
+ currentExecutionId,
10197
10197
  isInitialized: isInitialized && !isLoading,
10198
10198
  isSubmitting,
10199
10199
  onError: (err) => {
10200
10200
  clearFlowState();
10201
10201
  setError(err instanceof Error ? err : new Error(String(err)));
10202
10202
  },
10203
- onSubmit: async (payload) => handleSubmit({ flowId: payload.flowId, inputs: payload.inputs }),
10203
+ onSubmit: async (payload) => handleSubmit({ executionId: payload.executionId, inputs: payload.inputs }),
10204
10204
  processedRef: oauthCodeProcessedRef,
10205
- setFlowId
10205
+ setExecutionId
10206
10206
  });
10207
10207
  (0, import_react72.useEffect)(() => {
10208
- if (!passkeyState.isActive || !passkeyState.challenge && !passkeyState.creationOptions || !passkeyState.flowId) {
10208
+ if (!passkeyState.isActive || !passkeyState.challenge && !passkeyState.creationOptions || !passkeyState.executionId) {
10209
10209
  return;
10210
10210
  }
10211
10211
  if (passkeyProcessedRef.current) {
@@ -10236,7 +10236,7 @@ var SignIn = ({
10236
10236
  throw new Error("No passkey challenge or creation options available");
10237
10237
  }
10238
10238
  await handleSubmit({
10239
- flowId: passkeyState.flowId,
10239
+ executionId: passkeyState.executionId,
10240
10240
  inputs
10241
10241
  });
10242
10242
  };
@@ -10246,7 +10246,7 @@ var SignIn = ({
10246
10246
  challenge: null,
10247
10247
  creationOptions: null,
10248
10248
  error: null,
10249
- flowId: null,
10249
+ executionId: null,
10250
10250
  isActive: false
10251
10251
  });
10252
10252
  }).catch((error) => {
@@ -10254,7 +10254,7 @@ var SignIn = ({
10254
10254
  setFlowError(error);
10255
10255
  onError?.(error);
10256
10256
  });
10257
- }, [passkeyState.isActive, passkeyState.challenge, passkeyState.creationOptions, passkeyState.flowId]);
10257
+ }, [passkeyState.isActive, passkeyState.challenge, passkeyState.creationOptions, passkeyState.executionId]);
10258
10258
  if (children) {
10259
10259
  const renderProps = {
10260
10260
  additionalData,
@@ -11546,7 +11546,7 @@ var BaseSignUpContent2 = ({
11546
11546
  actionId: null,
11547
11547
  creationOptions: null,
11548
11548
  error: null,
11549
- flowId: null,
11549
+ executionId: null,
11550
11550
  isActive: false
11551
11551
  });
11552
11552
  const initializationAttemptedRef = (0, import_react75.useRef)(false);
@@ -11691,7 +11691,7 @@ var BaseSignUpContent2 = ({
11691
11691
  const { code, state } = event.data;
11692
11692
  if (code && state) {
11693
11693
  const payload = {
11694
- ...currentFlow.flowId && { flowId: currentFlow.flowId },
11694
+ ...currentFlow.executionId && { executionId: currentFlow.executionId },
11695
11695
  action: "",
11696
11696
  flowType: currentFlow.flowType || "REGISTRATION",
11697
11697
  inputs: {
@@ -11744,7 +11744,7 @@ var BaseSignUpContent2 = ({
11744
11744
  }
11745
11745
  if (code && state) {
11746
11746
  const payload = {
11747
- ...currentFlow.flowId && { flowId: currentFlow.flowId },
11747
+ ...currentFlow.executionId && { executionId: currentFlow.executionId },
11748
11748
  action: "",
11749
11749
  flowType: currentFlow.flowType || "REGISTRATION",
11750
11750
  inputs: {
@@ -11803,7 +11803,7 @@ var BaseSignUpContent2 = ({
11803
11803
  });
11804
11804
  }
11805
11805
  const payload = {
11806
- ...currentFlow.flowId && { flowId: currentFlow.flowId },
11806
+ ...currentFlow.executionId && { executionId: currentFlow.executionId },
11807
11807
  flowType: currentFlow.flowType || "REGISTRATION",
11808
11808
  ...component.id && { action: component.id },
11809
11809
  inputs: filteredInputs
@@ -11821,13 +11821,13 @@ var BaseSignUpContent2 = ({
11821
11821
  }
11822
11822
  if (response.data?.additionalData?.["passkeyCreationOptions"]) {
11823
11823
  const { passkeyCreationOptions } = response.data.additionalData;
11824
- const effectiveFlowIdForPasskey = response.flowId || currentFlow?.flowId;
11824
+ const effectiveExecutionIdForPasskey = response.executionId || currentFlow?.executionId;
11825
11825
  passkeyProcessedRef.current = false;
11826
11826
  setPasskeyState({
11827
11827
  actionId: component.id || "submit",
11828
11828
  creationOptions: passkeyCreationOptions,
11829
11829
  error: null,
11830
- flowId: effectiveFlowIdForPasskey,
11830
+ executionId: effectiveExecutionIdForPasskey,
11831
11831
  isActive: true
11832
11832
  });
11833
11833
  setIsLoading(false);
@@ -11844,7 +11844,7 @@ var BaseSignUpContent2 = ({
11844
11844
  }
11845
11845
  };
11846
11846
  (0, import_react75.useEffect)(() => {
11847
- if (!passkeyState.isActive || !passkeyState.creationOptions || !passkeyState.flowId) {
11847
+ if (!passkeyState.isActive || !passkeyState.creationOptions || !passkeyState.executionId) {
11848
11848
  return;
11849
11849
  }
11850
11850
  if (passkeyProcessedRef.current) {
@@ -11861,7 +11861,7 @@ var BaseSignUpContent2 = ({
11861
11861
  };
11862
11862
  const payload = {
11863
11863
  actionId: passkeyState.actionId || "submit",
11864
- flowId: passkeyState.flowId,
11864
+ executionId: passkeyState.executionId,
11865
11865
  flowType: currentFlow?.flowType || "REGISTRATION",
11866
11866
  inputs
11867
11867
  };
@@ -11876,13 +11876,13 @@ var BaseSignUpContent2 = ({
11876
11876
  }
11877
11877
  };
11878
11878
  performPasskeyRegistration().then(() => {
11879
- setPasskeyState({ actionId: null, creationOptions: null, error: null, flowId: null, isActive: false });
11879
+ setPasskeyState({ actionId: null, creationOptions: null, error: null, executionId: null, isActive: false });
11880
11880
  }).catch((error) => {
11881
11881
  setPasskeyState((prev) => ({ ...prev, error, isActive: false }));
11882
11882
  handleError(error);
11883
11883
  onError?.(error);
11884
11884
  });
11885
- }, [passkeyState.isActive, passkeyState.creationOptions, passkeyState.flowId]);
11885
+ }, [passkeyState.isActive, passkeyState.creationOptions, passkeyState.executionId]);
11886
11886
  const containerClasses = (0, import_css47.cx)(
11887
11887
  [
11888
11888
  (0, import_browser69.withVendorCSSClassPrefix)("signup"),
@@ -12373,7 +12373,7 @@ var BaseInviteUser = ({
12373
12373
  try {
12374
12374
  const inputs = data || formValues;
12375
12375
  const payload = {
12376
- flowId: currentFlow.flowId,
12376
+ executionId: currentFlow.executionId,
12377
12377
  inputs,
12378
12378
  verbose: true
12379
12379
  };
@@ -12504,8 +12504,8 @@ var BaseInviteUser = ({
12504
12504
  additionalData: currentFlow?.data?.additionalData,
12505
12505
  components,
12506
12506
  error: apiError,
12507
+ executionId: currentFlow?.executionId,
12507
12508
  fieldErrors: formErrors,
12508
- flowId: currentFlow?.flowId,
12509
12509
  handleInputBlur,
12510
12510
  handleInputChange,
12511
12511
  handleSubmit,
@@ -12676,7 +12676,7 @@ var BaseAcceptInvite_styles_default = useStyles23;
12676
12676
  // src/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.tsx
12677
12677
  var import_jsx_runtime88 = require("react/jsx-runtime");
12678
12678
  var BaseAcceptInvite = ({
12679
- flowId,
12679
+ executionId,
12680
12680
  inviteToken,
12681
12681
  onSubmit,
12682
12682
  onComplete,
@@ -12743,7 +12743,7 @@ var BaseAcceptInvite = ({
12743
12743
  [t, children]
12744
12744
  );
12745
12745
  useOAuthCallback({
12746
- currentFlowId: flowId ?? null,
12746
+ currentExecutionId: executionId ?? null,
12747
12747
  isInitialized: true,
12748
12748
  onComplete: () => {
12749
12749
  setIsValidatingToken(false);
@@ -12828,7 +12828,7 @@ var BaseAcceptInvite = ({
12828
12828
  try {
12829
12829
  const inputs = data || formValues;
12830
12830
  const payload = {
12831
- flowId: currentFlow.flowId,
12831
+ executionId: currentFlow.executionId,
12832
12832
  inputs,
12833
12833
  verbose: true
12834
12834
  };
@@ -12883,10 +12883,10 @@ var BaseAcceptInvite = ({
12883
12883
  if (tokenValidationAttemptedRef.current) {
12884
12884
  return;
12885
12885
  }
12886
- if (!flowId || !inviteToken) {
12886
+ if (!executionId || !inviteToken) {
12887
12887
  setIsValidatingToken(false);
12888
12888
  setIsTokenInvalid(true);
12889
- handleError(new Error("Invalid invite link. Missing flowId or inviteToken."));
12889
+ handleError(new Error("Invalid invite link. Missing executionId or inviteToken."));
12890
12890
  return;
12891
12891
  }
12892
12892
  tokenValidationAttemptedRef.current = true;
@@ -12894,11 +12894,11 @@ var BaseAcceptInvite = ({
12894
12894
  setIsValidatingToken(true);
12895
12895
  setApiError(null);
12896
12896
  try {
12897
- if (flowId) {
12898
- sessionStorage.setItem("asgardeo_flow_id", flowId);
12897
+ if (executionId) {
12898
+ sessionStorage.setItem("asgardeo_execution_id", executionId);
12899
12899
  }
12900
12900
  const payload = {
12901
- flowId,
12901
+ executionId,
12902
12902
  inputs: {
12903
12903
  inviteToken
12904
12904
  },
@@ -12920,7 +12920,7 @@ var BaseAcceptInvite = ({
12920
12920
  setIsValidatingToken(false);
12921
12921
  }
12922
12922
  })();
12923
- }, [flowId, inviteToken, onSubmit, onFlowChange, handleError, normalizeFlowResponseLocal]);
12923
+ }, [executionId, inviteToken, onSubmit, onFlowChange, handleError, normalizeFlowResponseLocal]);
12924
12924
  const extractHeadings = (0, import_react80.useCallback)((components2) => {
12925
12925
  let title2;
12926
12926
  let subtitle2;
@@ -12947,8 +12947,8 @@ var BaseAcceptInvite = ({
12947
12947
  const renderProps = {
12948
12948
  components,
12949
12949
  error: apiError,
12950
+ executionId,
12950
12951
  fieldErrors: formErrors,
12951
- flowId,
12952
12952
  goToSignIn: onGoToSignIn,
12953
12953
  handleInputBlur,
12954
12954
  handleInputChange,
@@ -13029,13 +13029,13 @@ var getUrlParams = () => {
13029
13029
  }
13030
13030
  const params = new URLSearchParams(window.location.search);
13031
13031
  return {
13032
- flowId: params.get("flowId") || void 0,
13032
+ executionId: params.get("executionId") || void 0,
13033
13033
  inviteToken: params.get("inviteToken") || void 0
13034
13034
  };
13035
13035
  };
13036
13036
  var AcceptInvite = ({
13037
13037
  baseUrl,
13038
- flowId: flowIdProp,
13038
+ executionId: executionIdProp,
13039
13039
  inviteToken: inviteTokenProp,
13040
13040
  onComplete,
13041
13041
  onError,
@@ -13048,8 +13048,8 @@ var AcceptInvite = ({
13048
13048
  showTitle = true,
13049
13049
  showSubtitle = true
13050
13050
  }) => {
13051
- const { flowId: urlFlowId, inviteToken: urlInviteToken } = (0, import_react81.useMemo)(() => getUrlParams(), []);
13052
- const flowId = flowIdProp || urlFlowId;
13051
+ const { executionId: urlExecutionId, inviteToken: urlInviteToken } = (0, import_react81.useMemo)(() => getUrlParams(), []);
13052
+ const executionId = executionIdProp || urlExecutionId;
13053
13053
  const inviteToken = inviteTokenProp || urlInviteToken;
13054
13054
  const apiBaseUrl = (0, import_react81.useMemo)(() => {
13055
13055
  if (baseUrl) {
@@ -13081,7 +13081,7 @@ var AcceptInvite = ({
13081
13081
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
13082
13082
  BaseAcceptInvite_default,
13083
13083
  {
13084
- flowId,
13084
+ executionId,
13085
13085
  inviteToken,
13086
13086
  onSubmit: handleSubmit,
13087
13087
  onComplete,