@asgardeo/react 0.6.14 → 0.6.16

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
@@ -749,16 +749,16 @@ var AsgardeoReactClient = class extends AsgardeoBrowserClient {
749
749
  return void 0;
750
750
  }
751
751
  if (isV2Platform && typeof arg1 === "object" && arg1 !== null && !isEmpty(arg1) && ("flowId" in arg1 || "applicationId" in arg1)) {
752
- const sessionDataKeyFromUrl = new URL(window.location.href).searchParams.get("sessionDataKey");
753
- const sessionDataKeyFromStorage = sessionStorage.getItem("asgardeo_session_data_key");
754
- const sessionDataKey = sessionDataKeyFromUrl || sessionDataKeyFromStorage;
752
+ const authIdFromUrl = new URL(window.location.href).searchParams.get("authId");
753
+ const authIdFromStorage = sessionStorage.getItem("asgardeo_auth_id");
754
+ const authId = authIdFromUrl || authIdFromStorage;
755
755
  const baseUrlFromStorage = sessionStorage.getItem("asgardeo_base_url");
756
756
  const baseUrl = config?.baseUrl || baseUrlFromStorage;
757
757
  return executeEmbeddedSignInFlowV2({
758
758
  payload: arg1,
759
759
  url: arg2?.url,
760
760
  baseUrl,
761
- sessionDataKey
761
+ authId
762
762
  });
763
763
  }
764
764
  if (typeof arg1 === "object" && "flowId" in arg1 && typeof arg2 === "object" && "url" in arg2) {
@@ -7603,7 +7603,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7603
7603
  const clearFlowState = () => {
7604
7604
  setFlowId(null);
7605
7605
  setIsFlowInitialized(false);
7606
- sessionStorage.removeItem("asgardeo_session_data_key");
7606
+ sessionStorage.removeItem("asgardeo_auth_id");
7607
7607
  oauthCodeProcessedRef.current = false;
7608
7608
  };
7609
7609
  const getUrlParams = () => {
@@ -7616,12 +7616,12 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7616
7616
  nonce: urlParams.get("nonce"),
7617
7617
  flowId: urlParams.get("flowId"),
7618
7618
  applicationId: urlParams.get("applicationId"),
7619
- sessionDataKey: urlParams.get("sessionDataKey")
7619
+ authId: urlParams.get("authId")
7620
7620
  };
7621
7621
  };
7622
- const handleSessionDataKey = (sessionDataKey) => {
7623
- if (sessionDataKey) {
7624
- sessionStorage.setItem("asgardeo_session_data_key", sessionDataKey);
7622
+ const handleAuthId = (authId) => {
7623
+ if (authId) {
7624
+ sessionStorage.setItem("asgardeo_auth_id", authId);
7625
7625
  }
7626
7626
  };
7627
7627
  const resolveFlowId = (currentFlowId2, state, flowIdFromUrl, storedFlowId) => {
@@ -7643,7 +7643,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7643
7643
  if (!window?.location?.href) return;
7644
7644
  const url = new URL(window.location.href);
7645
7645
  url.searchParams.delete("flowId");
7646
- url.searchParams.delete("sessionDataKey");
7646
+ url.searchParams.delete("authId");
7647
7647
  url.searchParams.delete("applicationId");
7648
7648
  window?.history?.replaceState({}, "", url.toString());
7649
7649
  };
@@ -7672,7 +7672,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7672
7672
  setFlowId(response.flowId);
7673
7673
  }
7674
7674
  const urlParams = getUrlParams();
7675
- handleSessionDataKey(urlParams.sessionDataKey);
7675
+ handleAuthId(urlParams.authId);
7676
7676
  window.location.href = redirectURL;
7677
7677
  return true;
7678
7678
  }
@@ -7686,7 +7686,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7686
7686
  handleOAuthError(urlParams.error, urlParams.errorDescription);
7687
7687
  return;
7688
7688
  }
7689
- handleSessionDataKey(urlParams.sessionDataKey);
7689
+ handleAuthId(urlParams.authId);
7690
7690
  if (urlParams.code || urlParams.state) {
7691
7691
  return;
7692
7692
  }
@@ -7699,7 +7699,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7699
7699
  const initializeFlow = async () => {
7700
7700
  const urlParams = getUrlParams();
7701
7701
  oauthCodeProcessedRef.current = false;
7702
- handleSessionDataKey(urlParams.sessionDataKey);
7702
+ handleAuthId(urlParams.authId);
7703
7703
  const effectiveApplicationId = applicationId || urlParams.applicationId;
7704
7704
  if (!urlParams.flowId && !effectiveApplicationId) {
7705
7705
  const error = new AsgardeoRuntimeError8(
@@ -7788,7 +7788,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7788
7788
  setFlowId(null);
7789
7789
  setIsFlowInitialized(false);
7790
7790
  sessionStorage.removeItem("asgardeo_flow_id");
7791
- sessionStorage.removeItem("asgardeo_session_data_key");
7791
+ sessionStorage.removeItem("asgardeo_auth_id");
7792
7792
  cleanupOAuthUrlParams(true);
7793
7793
  onSuccess && onSuccess({
7794
7794
  redirectUrl: finalRedirectUrl,