@nibssplc/cams-sdk-react 1.0.0-rc.130 → 1.0.0-rc.131

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.
@@ -2,6 +2,7 @@ export interface LoginPageProps {
2
2
  CredentialsAuthEndpoint?: string;
3
3
  useADLogin?: boolean;
4
4
  onADLoginSuccess?: () => void;
5
+ DisableCAMSUserProfileValidation?: boolean;
5
6
  }
6
- declare const DefaultLoginPage: ({ useADLogin, CredentialsAuthEndpoint, onADLoginSuccess, }: LoginPageProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const DefaultLoginPage: ({ useADLogin, CredentialsAuthEndpoint, onADLoginSuccess, DisableCAMSUserProfileValidation, }: LoginPageProps) => import("react/jsx-runtime").JSX.Element;
7
8
  export default DefaultLoginPage;
@@ -18,6 +18,7 @@ interface MFAGateProps {
18
18
  idToken: string;
19
19
  }) => void;
20
20
  onAuthError?: (error: any) => void;
21
+ DisableCAMSUserProfileValidation?: boolean;
21
22
  }
22
- declare const MFAGate: ({ children, fallback, usePassKey, useADLogin, CredentialsAuthEndpoint, 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;
23
+ declare const MFAGate: ({ children, fallback, usePassKey, useADLogin, CredentialsAuthEndpoint, MFAEndpoints, requiresMFA, onAuthSuccess, onAuthError, DisableCAMSUserProfileValidation, }: 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;
23
24
  export default MFAGate;
@@ -19,6 +19,7 @@ interface MSALProviderProps extends BaseProviderProps {
19
19
  idToken: string;
20
20
  }) => void;
21
21
  onAuthError?: (error: any) => void;
22
+ DisableCAMSUserProfileValidation?: boolean;
22
23
  }
23
24
  type UnifiedCAMSProviderProps = RegularProviderProps | MSALProviderProps;
24
25
  export declare function UnifiedCAMSProvider(props: UnifiedCAMSProviderProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.cjs.js CHANGED
@@ -922,7 +922,7 @@ function CAMSProviderCore(props) {
922
922
  ? __assign(__assign({}, props), { appCode: appCode, idleTimeout: 0 })
923
923
  : { appCode: "" });
924
924
  var msalAuth = useCAMSMSALAuth(mode === "MSAL"
925
- ? __assign(__assign({}, props), { appCode: appCode, ValidateUserEndpoint: props.ValidateUserEndpoint, activeCookiePeriod: 1 })
925
+ ? __assign(__assign({}, props), { appCode: appCode, ValidateUserEndpoint: props.ValidateUserEndpoint, activeCookiePeriod: 1, DisableCAMSUserProfileValidation: props.DisableCAMSUserProfileValidation })
926
926
  : { appCode: "", ValidateUserEndpoint: "" });
927
927
  var auth = mode === "REGULAR" ? regularAuth : msalAuth;
928
928
  var profileStorageKey = "".concat(auth.storageKey, "-PROFILE");
@@ -1670,7 +1670,7 @@ var ADLoginModal = function (_a) {
1670
1670
  };
1671
1671
 
1672
1672
  var DefaultLoginPage = function (_a) {
1673
- var useADLogin = _a.useADLogin, CredentialsAuthEndpoint = _a.CredentialsAuthEndpoint, onADLoginSuccess = _a.onADLoginSuccess;
1673
+ var useADLogin = _a.useADLogin, CredentialsAuthEndpoint = _a.CredentialsAuthEndpoint, onADLoginSuccess = _a.onADLoginSuccess; _a.DisableCAMSUserProfileValidation;
1674
1674
  var cardVariants = {
1675
1675
  hidden: { opacity: 0, scale: 0.8, y: 50 },
1676
1676
  visible: {
@@ -1766,7 +1766,7 @@ var MFAEndpointsSchema = z.object({
1766
1766
  AuthChallengeVerify: z.url("MFA AuthChallengeVerify must be a valid URL"),
1767
1767
  });
1768
1768
  var MFAGate = function (_a) {
1769
- var children = _a.children, _b = _a.fallback, fallback = _b === void 0 ? (jsxRuntime.jsx("div", { className: "h-screen flex items-center justify-center", children: jsxRuntime.jsx(LoadingScreen, {}) })) : _b; _a.usePassKey; var _d = _a.useADLogin, useADLogin = _d === void 0 ? false : _d, CredentialsAuthEndpoint = _a.CredentialsAuthEndpoint, MFAEndpoints = _a.MFAEndpoints, requiresMFA = _a.requiresMFA, onAuthSuccess = _a.onAuthSuccess, onAuthError = _a.onAuthError;
1769
+ var children = _a.children, _b = _a.fallback, fallback = _b === void 0 ? (jsxRuntime.jsx("div", { className: "h-screen flex items-center justify-center", children: jsxRuntime.jsx(LoadingScreen, {}) })) : _b; _a.usePassKey; var _d = _a.useADLogin, useADLogin = _d === void 0 ? false : _d, CredentialsAuthEndpoint = _a.CredentialsAuthEndpoint, MFAEndpoints = _a.MFAEndpoints, requiresMFA = _a.requiresMFA, onAuthSuccess = _a.onAuthSuccess, onAuthError = _a.onAuthError, DisableCAMSUserProfileValidation = _a.DisableCAMSUserProfileValidation;
1770
1770
  var context = useCAMSContext();
1771
1771
  var _e = React.useState("Loading"), authState = _e[0], setAuthState = _e[1];
1772
1772
  var ValidatedMFAEndpoints = React.useMemo(function () {
@@ -1846,7 +1846,7 @@ var MFAGate = function (_a) {
1846
1846
  // For REGULAR mode, check if user is authenticated
1847
1847
  if (context.user)
1848
1848
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
1849
- return (jsxRuntime.jsx(DefaultLoginPage, { useADLogin: useADLogin, CredentialsAuthEndpoint: CredentialsAuthEndpoint, onADLoginSuccess: function () { return setAuthState("Authenticated"); } }));
1849
+ return (jsxRuntime.jsx(DefaultLoginPage, { useADLogin: useADLogin, CredentialsAuthEndpoint: CredentialsAuthEndpoint, onADLoginSuccess: function () { return setAuthState("Authenticated"); }, DisableCAMSUserProfileValidation: DisableCAMSUserProfileValidation }));
1850
1850
  }
1851
1851
  switch (authState) {
1852
1852
  case "Loading":
@@ -1857,7 +1857,7 @@ var MFAGate = function (_a) {
1857
1857
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
1858
1858
  case "Unauthenticated":
1859
1859
  default:
1860
- return (jsxRuntime.jsx(DefaultLoginPage, { useADLogin: useADLogin, CredentialsAuthEndpoint: CredentialsAuthEndpoint, onADLoginSuccess: function () { return setAuthState("Authenticated"); } }));
1860
+ return (jsxRuntime.jsx(DefaultLoginPage, { useADLogin: useADLogin, CredentialsAuthEndpoint: CredentialsAuthEndpoint, onADLoginSuccess: function () { return setAuthState("Authenticated"); }, DisableCAMSUserProfileValidation: DisableCAMSUserProfileValidation }));
1861
1861
  }
1862
1862
  };
1863
1863