@nibssplc/cams-sdk-react 0.0.1-beta.27 → 0.0.1-beta.28

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.
@@ -1,10 +1,8 @@
1
- import { AccountInfo } from "@azure/msal-browser";
2
1
  import { CAMSError } from "@nibssplc/cams-sdk";
3
2
  export interface UseCAMSMSALAuthOptions {
4
3
  onAuthSuccess?: (token: string) => void;
5
4
  onAuthError?: (error: CAMSError) => void;
6
5
  onTokenExpired?: () => void;
7
- onMFARequired?: (msalToken: string, account: AccountInfo) => void;
8
6
  scopes?: string[];
9
7
  mfaUrl: string;
10
8
  prompt?: string;
package/dist/index.cjs.js CHANGED
@@ -16732,16 +16732,15 @@ function useCAMSMSALAuth(options) {
16732
16732
  prompt: options.prompt || "select_account",
16733
16733
  })
16734
16734
  .then(function (response) {
16735
- var _a, _b;
16735
+ var _a;
16736
16736
  setToken(response.accessToken);
16737
16737
  setAccessToken(response.accessToken);
16738
16738
  setIdToken(response.idToken);
16739
16739
  setIsMFAPending(true);
16740
- (_a = options.onMFARequired) === null || _a === void 0 ? void 0 : _a.call(options, response.accessToken, account);
16741
16740
  if (typeof window !== "undefined") {
16742
16741
  window.location.href = options.mfaUrl;
16743
16742
  }
16744
- (_b = options.onAuthSuccess) === null || _b === void 0 ? void 0 : _b.call(options, response.accessToken);
16743
+ (_a = options.onAuthSuccess) === null || _a === void 0 ? void 0 : _a.call(options, response.accessToken);
16745
16744
  })
16746
16745
  .catch(function (err) {
16747
16746
  var _a;