@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/cjs/index.js CHANGED
@@ -863,16 +863,16 @@ var AsgardeoReactClient = class extends import_browser6.AsgardeoBrowserClient {
863
863
  return void 0;
864
864
  }
865
865
  if (isV2Platform && typeof arg1 === "object" && arg1 !== null && !(0, import_browser6.isEmpty)(arg1) && ("flowId" in arg1 || "applicationId" in arg1)) {
866
- const sessionDataKeyFromUrl = new URL(window.location.href).searchParams.get("sessionDataKey");
867
- const sessionDataKeyFromStorage = sessionStorage.getItem("asgardeo_session_data_key");
868
- const sessionDataKey = sessionDataKeyFromUrl || sessionDataKeyFromStorage;
866
+ const authIdFromUrl = new URL(window.location.href).searchParams.get("authId");
867
+ const authIdFromStorage = sessionStorage.getItem("asgardeo_auth_id");
868
+ const authId = authIdFromUrl || authIdFromStorage;
869
869
  const baseUrlFromStorage = sessionStorage.getItem("asgardeo_base_url");
870
870
  const baseUrl = config?.baseUrl || baseUrlFromStorage;
871
871
  return (0, import_browser6.executeEmbeddedSignInFlowV2)({
872
872
  payload: arg1,
873
873
  url: arg2?.url,
874
874
  baseUrl,
875
- sessionDataKey
875
+ authId
876
876
  });
877
877
  }
878
878
  if (typeof arg1 === "object" && "flowId" in arg1 && typeof arg2 === "object" && "url" in arg2) {
@@ -7677,7 +7677,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7677
7677
  const clearFlowState = () => {
7678
7678
  setFlowId(null);
7679
7679
  setIsFlowInitialized(false);
7680
- sessionStorage.removeItem("asgardeo_session_data_key");
7680
+ sessionStorage.removeItem("asgardeo_auth_id");
7681
7681
  oauthCodeProcessedRef.current = false;
7682
7682
  };
7683
7683
  const getUrlParams = () => {
@@ -7690,12 +7690,12 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7690
7690
  nonce: urlParams.get("nonce"),
7691
7691
  flowId: urlParams.get("flowId"),
7692
7692
  applicationId: urlParams.get("applicationId"),
7693
- sessionDataKey: urlParams.get("sessionDataKey")
7693
+ authId: urlParams.get("authId")
7694
7694
  };
7695
7695
  };
7696
- const handleSessionDataKey = (sessionDataKey) => {
7697
- if (sessionDataKey) {
7698
- sessionStorage.setItem("asgardeo_session_data_key", sessionDataKey);
7696
+ const handleAuthId = (authId) => {
7697
+ if (authId) {
7698
+ sessionStorage.setItem("asgardeo_auth_id", authId);
7699
7699
  }
7700
7700
  };
7701
7701
  const resolveFlowId = (currentFlowId2, state, flowIdFromUrl, storedFlowId) => {
@@ -7717,7 +7717,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7717
7717
  if (!window?.location?.href) return;
7718
7718
  const url = new URL(window.location.href);
7719
7719
  url.searchParams.delete("flowId");
7720
- url.searchParams.delete("sessionDataKey");
7720
+ url.searchParams.delete("authId");
7721
7721
  url.searchParams.delete("applicationId");
7722
7722
  window?.history?.replaceState({}, "", url.toString());
7723
7723
  };
@@ -7746,7 +7746,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7746
7746
  setFlowId(response.flowId);
7747
7747
  }
7748
7748
  const urlParams = getUrlParams();
7749
- handleSessionDataKey(urlParams.sessionDataKey);
7749
+ handleAuthId(urlParams.authId);
7750
7750
  window.location.href = redirectURL;
7751
7751
  return true;
7752
7752
  }
@@ -7760,7 +7760,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7760
7760
  handleOAuthError(urlParams.error, urlParams.errorDescription);
7761
7761
  return;
7762
7762
  }
7763
- handleSessionDataKey(urlParams.sessionDataKey);
7763
+ handleAuthId(urlParams.authId);
7764
7764
  if (urlParams.code || urlParams.state) {
7765
7765
  return;
7766
7766
  }
@@ -7773,7 +7773,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7773
7773
  const initializeFlow = async () => {
7774
7774
  const urlParams = getUrlParams();
7775
7775
  oauthCodeProcessedRef.current = false;
7776
- handleSessionDataKey(urlParams.sessionDataKey);
7776
+ handleAuthId(urlParams.authId);
7777
7777
  const effectiveApplicationId = applicationId || urlParams.applicationId;
7778
7778
  if (!urlParams.flowId && !effectiveApplicationId) {
7779
7779
  const error = new import_browser51.AsgardeoRuntimeError(
@@ -7862,7 +7862,7 @@ var SignIn = ({ className, size = "medium", onSuccess, onError, variant, childre
7862
7862
  setFlowId(null);
7863
7863
  setIsFlowInitialized(false);
7864
7864
  sessionStorage.removeItem("asgardeo_flow_id");
7865
- sessionStorage.removeItem("asgardeo_session_data_key");
7865
+ sessionStorage.removeItem("asgardeo_auth_id");
7866
7866
  cleanupOAuthUrlParams(true);
7867
7867
  onSuccess && onSuccess({
7868
7868
  redirectUrl: finalRedirectUrl,