@nibssplc/cams-sdk-react 0.0.1-beta.20 → 0.0.1-beta.22

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/index.esm.js CHANGED
@@ -16714,6 +16714,9 @@ function useCAMSMSALAuth(options) {
16714
16714
  if (options.mfaUrl) {
16715
16715
  setIsMFAPending(true);
16716
16716
  (_a = options.onMFARequired) === null || _a === void 0 ? void 0 : _a.call(options, response.accessToken, account);
16717
+ if (typeof window !== "undefined") {
16718
+ window.location.href = options.mfaUrl;
16719
+ }
16717
16720
  }
16718
16721
  else {
16719
16722
  setToken(response.accessToken);
@@ -16753,7 +16756,7 @@ function useCAMSMSALAuth(options) {
16753
16756
  _b.label = 1;
16754
16757
  case 1:
16755
16758
  _b.trys.push([1, 3, , 4]);
16756
- return [4 /*yield*/, instance.loginPopup({
16759
+ return [4 /*yield*/, instance.loginRedirect({
16757
16760
  scopes: scopes,
16758
16761
  prompt: options.prompt || "select_account",
16759
16762
  })];
@@ -16769,7 +16772,7 @@ function useCAMSMSALAuth(options) {
16769
16772
  case 4: return [2 /*return*/];
16770
16773
  }
16771
16774
  });
16772
- }); }, [instance, scopes]);
16775
+ }); }, [instance, scopes, options]);
16773
16776
  var logout = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
16774
16777
  var err_2, camsError;
16775
16778
  return __generator(this, function (_a) {