@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.cjs.js CHANGED
@@ -16733,6 +16733,9 @@ function useCAMSMSALAuth(options) {
16733
16733
  if (options.mfaUrl) {
16734
16734
  setIsMFAPending(true);
16735
16735
  (_a = options.onMFARequired) === null || _a === void 0 ? void 0 : _a.call(options, response.accessToken, account);
16736
+ if (typeof window !== "undefined") {
16737
+ window.location.href = options.mfaUrl;
16738
+ }
16736
16739
  }
16737
16740
  else {
16738
16741
  setToken(response.accessToken);
@@ -16772,7 +16775,7 @@ function useCAMSMSALAuth(options) {
16772
16775
  _b.label = 1;
16773
16776
  case 1:
16774
16777
  _b.trys.push([1, 3, , 4]);
16775
- return [4 /*yield*/, instance.loginPopup({
16778
+ return [4 /*yield*/, instance.loginRedirect({
16776
16779
  scopes: scopes,
16777
16780
  prompt: options.prompt || "select_account",
16778
16781
  })];
@@ -16788,7 +16791,7 @@ function useCAMSMSALAuth(options) {
16788
16791
  case 4: return [2 /*return*/];
16789
16792
  }
16790
16793
  });
16791
- }); }, [instance, scopes]);
16794
+ }); }, [instance, scopes, options]);
16792
16795
  var logout = React__default.useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
16793
16796
  var err_2, camsError;
16794
16797
  return __generator(this, function (_a) {