@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.esm.js CHANGED
@@ -1464,20 +1464,7 @@ var useCredentialsHandler = function (onAuthComplete) {
1464
1464
  return [4 /*yield*/, authenticator.LoginADCredentials(credentials, CredentialsAuthEndpoint)];
1465
1465
  case 1:
1466
1466
  response = _a.sent();
1467
- // .then((data) => {
1468
- // context.isAuthenticated = true;
1469
- // (context as any).requiresMFA = false;
1470
- // context.setUserProfile({
1471
- // type: "AUTH_SUCCESS",
1472
- // userProfile: {
1473
- // ...data,
1474
- // },
1475
- // });
1476
- // })
1477
- // .catch((error) => {
1478
- // console.error("AD Login failed:", error);
1479
- // toast.error("❌ AD Login failed.");
1480
- // });
1467
+ console.log(response);
1481
1468
  if (response) {
1482
1469
  onAuthComplete(true, response);
1483
1470
  return [2 /*return*/, true];
@@ -1764,6 +1751,9 @@ var DefaultLoginPage = function (_a) {
1764
1751
  },
1765
1752
  });
1766
1753
  }
1754
+ else {
1755
+ toast.error("\u274C AD Login failed. ".concat((data === null || data === void 0 ? void 0 : data.message) || 'Unknown error'));
1756
+ }
1767
1757
  return [2 /*return*/];
1768
1758
  });
1769
1759
  }); }), handleSubmitCredentials = _d.handleSubmitCredentials, isCredAuthLoading = _d.loading, setIsCredAuthLoading = _d.setLoading;