@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/index.js CHANGED
@@ -819,7 +819,7 @@ var AsgardeoReactClient = class extends AsgardeoBrowserClient {
819
819
  if (isV2Platform && typeof arg1 === "object" && arg1 !== null && arg1.callOnlyOnRedirect === true) {
820
820
  return void 0;
821
821
  }
822
- if (isV2Platform && typeof arg1 === "object" && arg1 !== null && !isEmpty(arg1) && ("flowId" in arg1 || "applicationId" in arg1)) {
822
+ if (isV2Platform && typeof arg1 === "object" && arg1 !== null && !isEmpty(arg1) && ("executionId" in arg1 || "applicationId" in arg1)) {
823
823
  const authIdFromUrl = new URL(window.location.href).searchParams.get("authId");
824
824
  const authIdFromStorage = sessionStorage.getItem("asgardeo_auth_id");
825
825
  const authId = authIdFromUrl || authIdFromStorage;
@@ -2134,7 +2134,7 @@ var AsgardeoProvider = ({
2134
2134
  }
2135
2135
  async function signIn(...args) {
2136
2136
  const arg1 = args[0];
2137
- const isV2FlowRequest = config.platform === Platform4.AsgardeoV2 && typeof arg1 === "object" && arg1 !== null && ("flowId" in arg1 || "applicationId" in arg1);
2137
+ const isV2FlowRequest = config.platform === Platform4.AsgardeoV2 && typeof arg1 === "object" && arg1 !== null && ("executionId" in arg1 || "applicationId" in arg1);
2138
2138
  try {
2139
2139
  if (!isV2FlowRequest) {
2140
2140
  setIsUpdatingSession(true);
@@ -2196,9 +2196,9 @@ var AsgardeoProvider = ({
2196
2196
  if (isV2Platform) {
2197
2197
  const urlParams = currentUrl.searchParams;
2198
2198
  const code = urlParams.get("code");
2199
- const flowIdFromUrl = urlParams.get("flowId");
2200
- const storedFlowId = sessionStorage.getItem("asgardeo_flow_id");
2201
- if (code && !flowIdFromUrl && !storedFlowId) {
2199
+ const executionIdFromUrl = urlParams.get("executionId");
2200
+ const storedExecutionId = sessionStorage.getItem("asgardeo_execution_id");
2201
+ if (code && !executionIdFromUrl && !storedExecutionId) {
2202
2202
  await signIn();
2203
2203
  }
2204
2204
  } else {
@@ -7837,7 +7837,7 @@ var normalizeFlowResponse = (response, t, options = {}, meta) => {
7837
7837
  return {
7838
7838
  additionalData,
7839
7839
  components: transformComponents(response, t, resolveTranslations, meta),
7840
- flowId: response.flowId
7840
+ executionId: response.executionId
7841
7841
  };
7842
7842
  };
7843
7843
 
@@ -9509,8 +9509,8 @@ function cleanupUrlParams() {
9509
9509
  window.history.replaceState({}, "", url.toString());
9510
9510
  }
9511
9511
  function useOAuthCallback({
9512
- currentFlowId,
9513
- flowIdStorageKey = "asgardeo_flow_id",
9512
+ currentExecutionId,
9513
+ executionIdStorageKey = "asgardeo_execution_id",
9514
9514
  isInitialized,
9515
9515
  isSubmitting = false,
9516
9516
  onComplete,
@@ -9519,7 +9519,7 @@ function useOAuthCallback({
9519
9519
  onProcessingStart,
9520
9520
  onSubmit,
9521
9521
  processedRef,
9522
- setFlowId,
9522
+ setExecutionId: setExecExecutionId,
9523
9523
  tokenValidationAttemptedRef
9524
9524
  }) {
9525
9525
  const internalRef = useRef6(false);
@@ -9532,7 +9532,7 @@ function useOAuthCallback({
9532
9532
  const code = urlParams.get("code");
9533
9533
  const nonce = urlParams.get("nonce");
9534
9534
  const state = urlParams.get("state");
9535
- const flowIdFromUrl = urlParams.get("flowId");
9535
+ const executionIdFromUrl = urlParams.get("executionId");
9536
9536
  const error = urlParams.get("error");
9537
9537
  const errorDescription = urlParams.get("error_description");
9538
9538
  if (error) {
@@ -9550,11 +9550,11 @@ function useOAuthCallback({
9550
9550
  if (tokenValidationAttemptedRef?.current) {
9551
9551
  return;
9552
9552
  }
9553
- const storedFlowId = sessionStorage.getItem(flowIdStorageKey);
9554
- const flowIdToUse = currentFlowId || storedFlowId || flowIdFromUrl || state || null;
9555
- if (!flowIdToUse) {
9553
+ const storedExecutionId = sessionStorage.getItem(executionIdStorageKey);
9554
+ const executionIdToUse = currentExecutionId || storedExecutionId || executionIdFromUrl || state || null;
9555
+ if (!executionIdToUse) {
9556
9556
  oauthCodeProcessedRef.current = true;
9557
- onError?.(new Error("Invalid flow. Missing flowId."));
9557
+ onError?.(new Error("Invalid flow. Missing executionId."));
9558
9558
  cleanupUrlParams();
9559
9559
  return;
9560
9560
  }
@@ -9563,13 +9563,13 @@ function useOAuthCallback({
9563
9563
  tokenValidationAttemptedRef.current = true;
9564
9564
  }
9565
9565
  onProcessingStart?.();
9566
- if (!currentFlowId && setFlowId) {
9567
- setFlowId(flowIdToUse);
9566
+ if (!currentExecutionId && setExecExecutionId) {
9567
+ setExecExecutionId(executionIdToUse);
9568
9568
  }
9569
9569
  (async () => {
9570
9570
  try {
9571
9571
  const payload = {
9572
- flowId: flowIdToUse,
9572
+ executionId: executionIdToUse,
9573
9573
  inputs: {
9574
9574
  code,
9575
9575
  ...nonce && { nonce }
@@ -9591,14 +9591,14 @@ function useOAuthCallback({
9591
9591
  })();
9592
9592
  }, [
9593
9593
  isInitialized,
9594
- currentFlowId,
9594
+ currentExecutionId,
9595
9595
  isSubmitting,
9596
9596
  onSubmit,
9597
9597
  onComplete,
9598
9598
  onError,
9599
9599
  onFlowChange,
9600
- setFlowId,
9601
- flowIdStorageKey
9600
+ setExecExecutionId,
9601
+ executionIdStorageKey
9602
9602
  ]);
9603
9603
  }
9604
9604
 
@@ -9784,7 +9784,7 @@ var SignIn = ({
9784
9784
  const { t } = useTranslation_default(preferences?.i18n);
9785
9785
  const [components, setComponents] = useState20([]);
9786
9786
  const [additionalData, setAdditionalData] = useState20({});
9787
- const [currentFlowId, setCurrentFlowId] = useState20(null);
9787
+ const [currentExecutionId, setCurrentExecutionId] = useState20(null);
9788
9788
  const [isFlowInitialized, setIsFlowInitialized] = useState20(false);
9789
9789
  const [flowError, setFlowError] = useState20(null);
9790
9790
  const [isSubmitting, setIsSubmitting] = useState20(false);
@@ -9794,22 +9794,22 @@ var SignIn = ({
9794
9794
  challenge: null,
9795
9795
  creationOptions: null,
9796
9796
  error: null,
9797
- flowId: null,
9797
+ executionId: null,
9798
9798
  isActive: false
9799
9799
  });
9800
9800
  const initializationAttemptedRef = useRef7(false);
9801
9801
  const oauthCodeProcessedRef = useRef7(false);
9802
9802
  const passkeyProcessedRef = useRef7(false);
9803
- const setFlowId = (flowId) => {
9804
- setCurrentFlowId(flowId);
9805
- if (flowId) {
9806
- sessionStorage.setItem("asgardeo_flow_id", flowId);
9803
+ const setExecutionId = (executionId) => {
9804
+ setCurrentExecutionId(executionId);
9805
+ if (executionId) {
9806
+ sessionStorage.setItem("asgardeo_execution_id", executionId);
9807
9807
  } else {
9808
- sessionStorage.removeItem("asgardeo_flow_id");
9808
+ sessionStorage.removeItem("asgardeo_execution_id");
9809
9809
  }
9810
9810
  };
9811
9811
  const clearFlowState = () => {
9812
- setFlowId(null);
9812
+ setExecutionId(null);
9813
9813
  setIsFlowInitialized(false);
9814
9814
  sessionStorage.removeItem("asgardeo_auth_id");
9815
9815
  setIsTimeoutDisabled(false);
@@ -9823,7 +9823,7 @@ var SignIn = ({
9823
9823
  code: urlParams.get("code"),
9824
9824
  error: urlParams.get("error"),
9825
9825
  errorDescription: urlParams.get("error_description"),
9826
- flowId: urlParams.get("flowId"),
9826
+ executionId: urlParams.get("executionId"),
9827
9827
  nonce: urlParams.get("nonce"),
9828
9828
  state: urlParams.get("state")
9829
9829
  };
@@ -9848,7 +9848,7 @@ var SignIn = ({
9848
9848
  const cleanupFlowUrlParams = () => {
9849
9849
  if (!window?.location?.href) return;
9850
9850
  const url = new URL(window.location.href);
9851
- url.searchParams.delete("flowId");
9851
+ url.searchParams.delete("executionId");
9852
9852
  url.searchParams.delete("authId");
9853
9853
  url.searchParams.delete("applicationId");
9854
9854
  window?.history?.replaceState({}, "", url.toString());
@@ -9869,8 +9869,8 @@ var SignIn = ({
9869
9869
  if (response.type === EmbeddedSignInFlowTypeV2.Redirection) {
9870
9870
  const redirectURL = response.data?.redirectURL || response?.redirectURL;
9871
9871
  if (redirectURL && window?.location) {
9872
- if (response.flowId) {
9873
- setFlowId(response.flowId);
9872
+ if (response.executionId) {
9873
+ setExecutionId(response.executionId);
9874
9874
  }
9875
9875
  const urlParams = getUrlParams2();
9876
9876
  handleAuthId(urlParams.authId);
@@ -9885,9 +9885,9 @@ var SignIn = ({
9885
9885
  oauthCodeProcessedRef.current = false;
9886
9886
  handleAuthId(urlParams.authId);
9887
9887
  const effectiveApplicationId = applicationId || urlParams.applicationId;
9888
- if (!urlParams.flowId && !effectiveApplicationId) {
9888
+ if (!urlParams.executionId && !effectiveApplicationId) {
9889
9889
  const error = new AsgardeoRuntimeError8(
9890
- "Either flowId or applicationId is required for authentication",
9890
+ "Either executionId or applicationId is required for authentication",
9891
9891
  "SIGN_IN_ERROR",
9892
9892
  "react"
9893
9893
  );
@@ -9897,9 +9897,9 @@ var SignIn = ({
9897
9897
  try {
9898
9898
  setFlowError(null);
9899
9899
  let response;
9900
- if (urlParams.flowId) {
9900
+ if (urlParams.executionId) {
9901
9901
  response = await signIn({
9902
- flowId: urlParams.flowId
9902
+ executionId: urlParams.executionId
9903
9903
  });
9904
9904
  } else {
9905
9905
  response = await signIn({
@@ -9911,7 +9911,7 @@ var SignIn = ({
9911
9911
  return;
9912
9912
  }
9913
9913
  const {
9914
- flowId: normalizedFlowId,
9914
+ executionId: normalizedExecutionId,
9915
9915
  components: normalizedComponents,
9916
9916
  additionalData: normalizedAdditionalData
9917
9917
  } = normalizeFlowResponse(
@@ -9922,8 +9922,8 @@ var SignIn = ({
9922
9922
  },
9923
9923
  meta
9924
9924
  );
9925
- if (normalizedFlowId && normalizedComponents) {
9926
- setFlowId(normalizedFlowId);
9925
+ if (normalizedExecutionId && normalizedComponents) {
9926
+ setExecutionId(normalizedExecutionId);
9927
9927
  setComponents(normalizedComponents);
9928
9928
  setAdditionalData(normalizedAdditionalData ?? {});
9929
9929
  setIsFlowInitialized(true);
@@ -9948,11 +9948,11 @@ var SignIn = ({
9948
9948
  }, []);
9949
9949
  useEffect18(() => {
9950
9950
  const currentUrlParams = getUrlParams2();
9951
- if (isInitialized && !isLoading && !isFlowInitialized && !initializationAttemptedRef.current && !currentFlowId && !currentUrlParams.code && !currentUrlParams.state && !isSubmitting && !oauthCodeProcessedRef.current) {
9951
+ if (isInitialized && !isLoading && !isFlowInitialized && !initializationAttemptedRef.current && !currentExecutionId && !currentUrlParams.code && !currentUrlParams.state && !isSubmitting && !oauthCodeProcessedRef.current) {
9952
9952
  initializationAttemptedRef.current = true;
9953
9953
  initializeFlow();
9954
9954
  }
9955
- }, [isInitialized, isLoading, isFlowInitialized, currentFlowId]);
9955
+ }, [isInitialized, isLoading, isFlowInitialized, currentExecutionId]);
9956
9956
  useEffect18(() => {
9957
9957
  const timeoutMs = Number(additionalData?.["stepTimeout"]) || 0;
9958
9958
  if (timeoutMs <= 0 || !isFlowInitialized) {
@@ -9975,8 +9975,8 @@ var SignIn = ({
9975
9975
  return () => clearTimeout(timerId);
9976
9976
  }, [additionalData?.["stepTimeout"], isFlowInitialized, t]);
9977
9977
  const handleSubmit = async (payload) => {
9978
- const effectiveFlowId = payload.flowId || currentFlowId;
9979
- if (!effectiveFlowId) {
9978
+ const effectiveExecutionId = payload.executionId || currentExecutionId;
9979
+ if (!effectiveExecutionId) {
9980
9980
  throw new Error("No active flow ID");
9981
9981
  }
9982
9982
  const processedInputs = { ...payload.inputs };
@@ -10033,7 +10033,7 @@ var SignIn = ({
10033
10033
  setIsSubmitting(true);
10034
10034
  setFlowError(null);
10035
10035
  const response = await signIn({
10036
- flowId: effectiveFlowId,
10036
+ executionId: effectiveExecutionId,
10037
10037
  ...payload,
10038
10038
  inputs: processedInputs
10039
10039
  });
@@ -10042,21 +10042,21 @@ var SignIn = ({
10042
10042
  }
10043
10043
  if (response.data?.additionalData?.["passkeyChallenge"] || response.data?.additionalData?.["passkeyCreationOptions"]) {
10044
10044
  const { passkeyChallenge, passkeyCreationOptions } = response.data.additionalData;
10045
- const effectiveFlowIdForPasskey = response.flowId || effectiveFlowId;
10045
+ const effectiveExecutionIdForPasskey = response.executionId || effectiveExecutionId;
10046
10046
  passkeyProcessedRef.current = false;
10047
10047
  setPasskeyState({
10048
10048
  actionId: "submit",
10049
10049
  challenge: passkeyChallenge,
10050
10050
  creationOptions: passkeyCreationOptions,
10051
10051
  error: null,
10052
- flowId: effectiveFlowIdForPasskey,
10052
+ executionId: effectiveExecutionIdForPasskey,
10053
10053
  isActive: true
10054
10054
  });
10055
10055
  setIsSubmitting(false);
10056
10056
  return;
10057
10057
  }
10058
10058
  const {
10059
- flowId: normalizedFlowId,
10059
+ executionId: normalizedExecutionId,
10060
10060
  components: normalizedComponents,
10061
10061
  additionalData: normalizedAdditionalData
10062
10062
  } = normalizeFlowResponse(
@@ -10080,9 +10080,9 @@ var SignIn = ({
10080
10080
  const redirectUrl = response?.redirectUrl || response?.redirect_uri;
10081
10081
  const finalRedirectUrl = redirectUrl || afterSignInUrl;
10082
10082
  setIsSubmitting(false);
10083
- setFlowId(null);
10083
+ setExecutionId(null);
10084
10084
  setIsFlowInitialized(false);
10085
- sessionStorage.removeItem("asgardeo_flow_id");
10085
+ sessionStorage.removeItem("asgardeo_execution_id");
10086
10086
  sessionStorage.removeItem("asgardeo_auth_id");
10087
10087
  cleanupOAuthUrlParams(true);
10088
10088
  if (onSuccess) {
@@ -10096,8 +10096,8 @@ var SignIn = ({
10096
10096
  }
10097
10097
  return;
10098
10098
  }
10099
- if (normalizedFlowId && normalizedComponents) {
10100
- setFlowId(normalizedFlowId);
10099
+ if (normalizedExecutionId && normalizedComponents) {
10100
+ setExecutionId(normalizedExecutionId);
10101
10101
  setComponents(normalizedComponents);
10102
10102
  setAdditionalData(normalizedAdditionalData ?? {});
10103
10103
  setIsTimeoutDisabled(false);
@@ -10121,19 +10121,19 @@ var SignIn = ({
10121
10121
  setError(error);
10122
10122
  };
10123
10123
  useOAuthCallback({
10124
- currentFlowId,
10124
+ currentExecutionId,
10125
10125
  isInitialized: isInitialized && !isLoading,
10126
10126
  isSubmitting,
10127
10127
  onError: (err) => {
10128
10128
  clearFlowState();
10129
10129
  setError(err instanceof Error ? err : new Error(String(err)));
10130
10130
  },
10131
- onSubmit: async (payload) => handleSubmit({ flowId: payload.flowId, inputs: payload.inputs }),
10131
+ onSubmit: async (payload) => handleSubmit({ executionId: payload.executionId, inputs: payload.inputs }),
10132
10132
  processedRef: oauthCodeProcessedRef,
10133
- setFlowId
10133
+ setExecutionId
10134
10134
  });
10135
10135
  useEffect18(() => {
10136
- if (!passkeyState.isActive || !passkeyState.challenge && !passkeyState.creationOptions || !passkeyState.flowId) {
10136
+ if (!passkeyState.isActive || !passkeyState.challenge && !passkeyState.creationOptions || !passkeyState.executionId) {
10137
10137
  return;
10138
10138
  }
10139
10139
  if (passkeyProcessedRef.current) {
@@ -10164,7 +10164,7 @@ var SignIn = ({
10164
10164
  throw new Error("No passkey challenge or creation options available");
10165
10165
  }
10166
10166
  await handleSubmit({
10167
- flowId: passkeyState.flowId,
10167
+ executionId: passkeyState.executionId,
10168
10168
  inputs
10169
10169
  });
10170
10170
  };
@@ -10174,7 +10174,7 @@ var SignIn = ({
10174
10174
  challenge: null,
10175
10175
  creationOptions: null,
10176
10176
  error: null,
10177
- flowId: null,
10177
+ executionId: null,
10178
10178
  isActive: false
10179
10179
  });
10180
10180
  }).catch((error) => {
@@ -10182,7 +10182,7 @@ var SignIn = ({
10182
10182
  setFlowError(error);
10183
10183
  onError?.(error);
10184
10184
  });
10185
- }, [passkeyState.isActive, passkeyState.challenge, passkeyState.creationOptions, passkeyState.flowId]);
10185
+ }, [passkeyState.isActive, passkeyState.challenge, passkeyState.creationOptions, passkeyState.executionId]);
10186
10186
  if (children) {
10187
10187
  const renderProps = {
10188
10188
  additionalData,
@@ -11486,7 +11486,7 @@ var BaseSignUpContent2 = ({
11486
11486
  actionId: null,
11487
11487
  creationOptions: null,
11488
11488
  error: null,
11489
- flowId: null,
11489
+ executionId: null,
11490
11490
  isActive: false
11491
11491
  });
11492
11492
  const initializationAttemptedRef = useRef9(false);
@@ -11631,7 +11631,7 @@ var BaseSignUpContent2 = ({
11631
11631
  const { code, state } = event.data;
11632
11632
  if (code && state) {
11633
11633
  const payload = {
11634
- ...currentFlow.flowId && { flowId: currentFlow.flowId },
11634
+ ...currentFlow.executionId && { executionId: currentFlow.executionId },
11635
11635
  action: "",
11636
11636
  flowType: currentFlow.flowType || "REGISTRATION",
11637
11637
  inputs: {
@@ -11684,7 +11684,7 @@ var BaseSignUpContent2 = ({
11684
11684
  }
11685
11685
  if (code && state) {
11686
11686
  const payload = {
11687
- ...currentFlow.flowId && { flowId: currentFlow.flowId },
11687
+ ...currentFlow.executionId && { executionId: currentFlow.executionId },
11688
11688
  action: "",
11689
11689
  flowType: currentFlow.flowType || "REGISTRATION",
11690
11690
  inputs: {
@@ -11743,7 +11743,7 @@ var BaseSignUpContent2 = ({
11743
11743
  });
11744
11744
  }
11745
11745
  const payload = {
11746
- ...currentFlow.flowId && { flowId: currentFlow.flowId },
11746
+ ...currentFlow.executionId && { executionId: currentFlow.executionId },
11747
11747
  flowType: currentFlow.flowType || "REGISTRATION",
11748
11748
  ...component.id && { action: component.id },
11749
11749
  inputs: filteredInputs
@@ -11761,13 +11761,13 @@ var BaseSignUpContent2 = ({
11761
11761
  }
11762
11762
  if (response.data?.additionalData?.["passkeyCreationOptions"]) {
11763
11763
  const { passkeyCreationOptions } = response.data.additionalData;
11764
- const effectiveFlowIdForPasskey = response.flowId || currentFlow?.flowId;
11764
+ const effectiveExecutionIdForPasskey = response.executionId || currentFlow?.executionId;
11765
11765
  passkeyProcessedRef.current = false;
11766
11766
  setPasskeyState({
11767
11767
  actionId: component.id || "submit",
11768
11768
  creationOptions: passkeyCreationOptions,
11769
11769
  error: null,
11770
- flowId: effectiveFlowIdForPasskey,
11770
+ executionId: effectiveExecutionIdForPasskey,
11771
11771
  isActive: true
11772
11772
  });
11773
11773
  setIsLoading(false);
@@ -11784,7 +11784,7 @@ var BaseSignUpContent2 = ({
11784
11784
  }
11785
11785
  };
11786
11786
  useEffect20(() => {
11787
- if (!passkeyState.isActive || !passkeyState.creationOptions || !passkeyState.flowId) {
11787
+ if (!passkeyState.isActive || !passkeyState.creationOptions || !passkeyState.executionId) {
11788
11788
  return;
11789
11789
  }
11790
11790
  if (passkeyProcessedRef.current) {
@@ -11801,7 +11801,7 @@ var BaseSignUpContent2 = ({
11801
11801
  };
11802
11802
  const payload = {
11803
11803
  actionId: passkeyState.actionId || "submit",
11804
- flowId: passkeyState.flowId,
11804
+ executionId: passkeyState.executionId,
11805
11805
  flowType: currentFlow?.flowType || "REGISTRATION",
11806
11806
  inputs
11807
11807
  };
@@ -11816,13 +11816,13 @@ var BaseSignUpContent2 = ({
11816
11816
  }
11817
11817
  };
11818
11818
  performPasskeyRegistration().then(() => {
11819
- setPasskeyState({ actionId: null, creationOptions: null, error: null, flowId: null, isActive: false });
11819
+ setPasskeyState({ actionId: null, creationOptions: null, error: null, executionId: null, isActive: false });
11820
11820
  }).catch((error) => {
11821
11821
  setPasskeyState((prev) => ({ ...prev, error, isActive: false }));
11822
11822
  handleError(error);
11823
11823
  onError?.(error);
11824
11824
  });
11825
- }, [passkeyState.isActive, passkeyState.creationOptions, passkeyState.flowId]);
11825
+ }, [passkeyState.isActive, passkeyState.creationOptions, passkeyState.executionId]);
11826
11826
  const containerClasses = cx25(
11827
11827
  [
11828
11828
  withVendorCSSClassPrefix24("signup"),
@@ -12319,7 +12319,7 @@ var BaseInviteUser = ({
12319
12319
  try {
12320
12320
  const inputs = data || formValues;
12321
12321
  const payload = {
12322
- flowId: currentFlow.flowId,
12322
+ executionId: currentFlow.executionId,
12323
12323
  inputs,
12324
12324
  verbose: true
12325
12325
  };
@@ -12450,8 +12450,8 @@ var BaseInviteUser = ({
12450
12450
  additionalData: currentFlow?.data?.additionalData,
12451
12451
  components,
12452
12452
  error: apiError,
12453
+ executionId: currentFlow?.executionId,
12453
12454
  fieldErrors: formErrors,
12454
- flowId: currentFlow?.flowId,
12455
12455
  handleInputBlur,
12456
12456
  handleInputChange,
12457
12457
  handleSubmit,
@@ -12622,7 +12622,7 @@ var BaseAcceptInvite_styles_default = useStyles23;
12622
12622
  // src/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.tsx
12623
12623
  import { jsx as jsx88, jsxs as jsxs38 } from "react/jsx-runtime";
12624
12624
  var BaseAcceptInvite = ({
12625
- flowId,
12625
+ executionId,
12626
12626
  inviteToken,
12627
12627
  onSubmit,
12628
12628
  onComplete,
@@ -12689,7 +12689,7 @@ var BaseAcceptInvite = ({
12689
12689
  [t, children]
12690
12690
  );
12691
12691
  useOAuthCallback({
12692
- currentFlowId: flowId ?? null,
12692
+ currentExecutionId: executionId ?? null,
12693
12693
  isInitialized: true,
12694
12694
  onComplete: () => {
12695
12695
  setIsValidatingToken(false);
@@ -12774,7 +12774,7 @@ var BaseAcceptInvite = ({
12774
12774
  try {
12775
12775
  const inputs = data || formValues;
12776
12776
  const payload = {
12777
- flowId: currentFlow.flowId,
12777
+ executionId: currentFlow.executionId,
12778
12778
  inputs,
12779
12779
  verbose: true
12780
12780
  };
@@ -12829,10 +12829,10 @@ var BaseAcceptInvite = ({
12829
12829
  if (tokenValidationAttemptedRef.current) {
12830
12830
  return;
12831
12831
  }
12832
- if (!flowId || !inviteToken) {
12832
+ if (!executionId || !inviteToken) {
12833
12833
  setIsValidatingToken(false);
12834
12834
  setIsTokenInvalid(true);
12835
- handleError(new Error("Invalid invite link. Missing flowId or inviteToken."));
12835
+ handleError(new Error("Invalid invite link. Missing executionId or inviteToken."));
12836
12836
  return;
12837
12837
  }
12838
12838
  tokenValidationAttemptedRef.current = true;
@@ -12840,11 +12840,11 @@ var BaseAcceptInvite = ({
12840
12840
  setIsValidatingToken(true);
12841
12841
  setApiError(null);
12842
12842
  try {
12843
- if (flowId) {
12844
- sessionStorage.setItem("asgardeo_flow_id", flowId);
12843
+ if (executionId) {
12844
+ sessionStorage.setItem("asgardeo_execution_id", executionId);
12845
12845
  }
12846
12846
  const payload = {
12847
- flowId,
12847
+ executionId,
12848
12848
  inputs: {
12849
12849
  inviteToken
12850
12850
  },
@@ -12866,7 +12866,7 @@ var BaseAcceptInvite = ({
12866
12866
  setIsValidatingToken(false);
12867
12867
  }
12868
12868
  })();
12869
- }, [flowId, inviteToken, onSubmit, onFlowChange, handleError, normalizeFlowResponseLocal]);
12869
+ }, [executionId, inviteToken, onSubmit, onFlowChange, handleError, normalizeFlowResponseLocal]);
12870
12870
  const extractHeadings = useCallback18((components2) => {
12871
12871
  let title2;
12872
12872
  let subtitle2;
@@ -12893,8 +12893,8 @@ var BaseAcceptInvite = ({
12893
12893
  const renderProps = {
12894
12894
  components,
12895
12895
  error: apiError,
12896
+ executionId,
12896
12897
  fieldErrors: formErrors,
12897
- flowId,
12898
12898
  goToSignIn: onGoToSignIn,
12899
12899
  handleInputBlur,
12900
12900
  handleInputChange,
@@ -12975,13 +12975,13 @@ var getUrlParams = () => {
12975
12975
  }
12976
12976
  const params = new URLSearchParams(window.location.search);
12977
12977
  return {
12978
- flowId: params.get("flowId") || void 0,
12978
+ executionId: params.get("executionId") || void 0,
12979
12979
  inviteToken: params.get("inviteToken") || void 0
12980
12980
  };
12981
12981
  };
12982
12982
  var AcceptInvite = ({
12983
12983
  baseUrl,
12984
- flowId: flowIdProp,
12984
+ executionId: executionIdProp,
12985
12985
  inviteToken: inviteTokenProp,
12986
12986
  onComplete,
12987
12987
  onError,
@@ -12994,8 +12994,8 @@ var AcceptInvite = ({
12994
12994
  showTitle = true,
12995
12995
  showSubtitle = true
12996
12996
  }) => {
12997
- const { flowId: urlFlowId, inviteToken: urlInviteToken } = useMemo32(() => getUrlParams(), []);
12998
- const flowId = flowIdProp || urlFlowId;
12997
+ const { executionId: urlExecutionId, inviteToken: urlInviteToken } = useMemo32(() => getUrlParams(), []);
12998
+ const executionId = executionIdProp || urlExecutionId;
12999
12999
  const inviteToken = inviteTokenProp || urlInviteToken;
13000
13000
  const apiBaseUrl = useMemo32(() => {
13001
13001
  if (baseUrl) {
@@ -13027,7 +13027,7 @@ var AcceptInvite = ({
13027
13027
  return /* @__PURE__ */ jsx89(
13028
13028
  BaseAcceptInvite_default,
13029
13029
  {
13030
- flowId,
13030
+ executionId,
13031
13031
  inviteToken,
13032
13032
  onSubmit: handleSubmit,
13033
13033
  onComplete,