@asgardeo/react 0.24.2 → 0.25.2

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
@@ -2467,7 +2467,7 @@ var AsgardeoProvider = ({
2467
2467
  if (config.platform === import_browser16.Platform.AsgardeoV2) {
2468
2468
  return;
2469
2469
  }
2470
- const shouldFetchBranding = preferences?.theme?.inheritFromBranding !== false;
2470
+ const shouldFetchBranding = preferences?.theme?.inheritFromBranding === true;
2471
2471
  if (shouldFetchBranding && isInitializedSync && baseUrl && !hasFetchedBranding && !isBrandingLoading) {
2472
2472
  fetchBranding();
2473
2473
  }
@@ -2658,7 +2658,7 @@ var AsgardeoProvider = ({
2658
2658
  brandingPreference,
2659
2659
  isLoading: isBrandingLoading,
2660
2660
  error: brandingError,
2661
- enabled: preferences?.theme?.inheritFromBranding !== false,
2661
+ enabled: preferences?.theme?.inheritFromBranding === true,
2662
2662
  refetch: refetchBranding,
2663
2663
  children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2664
2664
  ThemeProvider_default3,
@@ -14082,6 +14082,13 @@ var BaseAcceptInvite = ({
14082
14082
  const response = normalizeFlowResponseLocal(rawResponse);
14083
14083
  onFlowChange?.(response);
14084
14084
  await setChallengeToken(response.challengeToken ?? null);
14085
+ if (response.type === "REDIRECTION") {
14086
+ const redirectURL = response.data?.redirectURL || response?.redirectURL;
14087
+ if (redirectURL && typeof window !== "undefined") {
14088
+ initiateOAuthRedirect(redirectURL);
14089
+ return;
14090
+ }
14091
+ }
14085
14092
  if (response.flowStatus === "ERROR") {
14086
14093
  setIsTokenInvalid(true);
14087
14094
  handleError(response);