@nibssplc/cams-sdk-react 1.0.0-rc.64 → 1.0.0-rc.65

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
@@ -1485,20 +1485,7 @@ var useCredentialsHandler = function (onAuthComplete) {
1485
1485
  return [4 /*yield*/, authenticator.LoginADCredentials(credentials, CredentialsAuthEndpoint)];
1486
1486
  case 1:
1487
1487
  response = _a.sent();
1488
- // .then((data) => {
1489
- // context.isAuthenticated = true;
1490
- // (context as any).requiresMFA = false;
1491
- // context.setUserProfile({
1492
- // type: "AUTH_SUCCESS",
1493
- // userProfile: {
1494
- // ...data,
1495
- // },
1496
- // });
1497
- // })
1498
- // .catch((error) => {
1499
- // console.error("AD Login failed:", error);
1500
- // toast.error("❌ AD Login failed.");
1501
- // });
1488
+ console.log(response);
1502
1489
  if (response) {
1503
1490
  onAuthComplete(true, response);
1504
1491
  return [2 /*return*/, true];
@@ -1785,6 +1772,9 @@ var DefaultLoginPage = function (_a) {
1785
1772
  },
1786
1773
  });
1787
1774
  }
1775
+ else {
1776
+ sonner.toast.error("\u274C AD Login failed. ".concat((data === null || data === void 0 ? void 0 : data.message) || 'Unknown error'));
1777
+ }
1788
1778
  return [2 /*return*/];
1789
1779
  });
1790
1780
  }); }), handleSubmitCredentials = _d.handleSubmitCredentials, isCredAuthLoading = _d.loading, setIsCredAuthLoading = _d.setLoading;