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

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
@@ -16707,22 +16707,21 @@ function useCAMSMSALAuth(options) {
16707
16707
  if (account && !isMFAPending) {
16708
16708
  // Get token in foreground popup
16709
16709
  instance
16710
- .acquireTokenSilent({
16710
+ .acquireTokenPopup({
16711
16711
  scopes: scopes,
16712
16712
  account: account,
16713
- prompt: options.prompt || "select_account",
16713
+ prompt: options.prompt || "login",
16714
16714
  })
16715
16715
  .then(function (response) {
16716
- var _a, _b;
16716
+ var _a;
16717
16717
  setToken(response.accessToken);
16718
16718
  setAccessToken(response.accessToken);
16719
16719
  setIdToken(response.idToken);
16720
16720
  setIsMFAPending(true);
16721
- (_a = options.onMFARequired) === null || _a === void 0 ? void 0 : _a.call(options, response.accessToken, account);
16722
16721
  if (typeof window !== "undefined") {
16723
16722
  window.location.href = options.mfaUrl;
16724
16723
  }
16725
- (_b = options.onAuthSuccess) === null || _b === void 0 ? void 0 : _b.call(options, response.accessToken);
16724
+ (_a = options.onAuthSuccess) === null || _a === void 0 ? void 0 : _a.call(options, response.accessToken);
16726
16725
  })
16727
16726
  .catch(function (err) {
16728
16727
  var _a;
@@ -16744,7 +16743,7 @@ function useCAMSMSALAuth(options) {
16744
16743
  _d.trys.push([1, 3, , 8]);
16745
16744
  return [4 /*yield*/, instance.loginPopup({
16746
16745
  scopes: scopes,
16747
- prompt: options.prompt || "select_account",
16746
+ prompt: options.prompt || "login",
16748
16747
  })];
16749
16748
  case 2:
16750
16749
  _d.sent();
@@ -16758,7 +16757,7 @@ function useCAMSMSALAuth(options) {
16758
16757
  _d.trys.push([4, 6, , 7]);
16759
16758
  return [4 /*yield*/, instance.loginRedirect({
16760
16759
  scopes: scopes,
16761
- prompt: options.prompt || "select_account",
16760
+ prompt: options.prompt || "login",
16762
16761
  })];
16763
16762
  case 5:
16764
16763
  _d.sent();