@nibssplc/cams-sdk-react 1.0.0-rc.71 → 1.0.0-rc.72

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.
@@ -22,5 +22,5 @@ interface MFAGateProps {
22
22
  }) => void;
23
23
  onAuthError?: (error: any) => void;
24
24
  }
25
- declare const MFAGate: ({ children, fallback, usePassKey, useADLogin, CredentialsAuthEndpoint, PassKeysRegisterProps, MFAEndpoints, requiresMFA, onAuthSuccess, onAuthError, }: MFAGateProps) => string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
25
+ declare const MFAGate: ({ children, fallback, usePassKey, useADLogin, CredentialsAuthEndpoint, PassKeysRegisterProps, MFAEndpoints, requiresMFA, onAuthSuccess, onAuthError, }: MFAGateProps) => string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null;
26
26
  export default MFAGate;
package/dist/index.cjs.js CHANGED
@@ -1891,30 +1891,6 @@ var MFAGate = function (_a) {
1891
1891
  return jsxRuntime.jsx(ErrorFallback, { message: "Invalid MFA Configuration." });
1892
1892
  if (context.authMode !== "MSAL")
1893
1893
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
1894
- // if (!context.isAuthenticated) {
1895
- // const shouldRequireMFA =
1896
- // requiresMFA ?? ("requiresMFA" in context ? context.requiresMFA : false);
1897
- // const accessToken = "accessToken" in context ? context.accessToken : "";
1898
- // if (shouldRequireMFA && accessToken) {
1899
- // return (
1900
- // <MFAOptions
1901
- // MFAEndpoints={validatedMFAEndpoints}
1902
- // usePassKey={usePassKey}
1903
- // onComplete={handleComplete}
1904
- // onAuthFailed={handleAuthFailed}
1905
- // />
1906
- // );
1907
- // }
1908
- // return (
1909
- // <DefaultLoginPage
1910
- // usePassKey={usePassKey}
1911
- // useADLogin={useADLogin}
1912
- // MFAEndpoints={MFAEndpoints!}
1913
- // PassKeysRegisterProps={PassKeysRegisterProps}
1914
- // CredentialsAuthEndpoint={CredentialsAuthEndpoint}
1915
- // />
1916
- // );
1917
- // }
1918
1894
  switch (authState) {
1919
1895
  case "Loading":
1920
1896
  return fallback;
@@ -1924,7 +1900,7 @@ var MFAGate = function (_a) {
1924
1900
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
1925
1901
  case "Unauthenticated":
1926
1902
  default:
1927
- jsxRuntime.jsx(DefaultLoginPage, { usePassKey: usePassKey, useADLogin: useADLogin, MFAEndpoints: MFAEndpoints, PassKeysRegisterProps: PassKeysRegisterProps, CredentialsAuthEndpoint: CredentialsAuthEndpoint });
1903
+ return (jsxRuntime.jsx(DefaultLoginPage, { usePassKey: usePassKey, useADLogin: useADLogin, MFAEndpoints: MFAEndpoints, PassKeysRegisterProps: PassKeysRegisterProps, CredentialsAuthEndpoint: CredentialsAuthEndpoint }));
1928
1904
  }
1929
1905
  };
1930
1906