@nibssplc/cams-sdk-react 1.0.0-rc.95 → 1.0.0-rc.97
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 +5 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5 -7
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1563,14 +1563,12 @@ var MFAOptions = function (_a) {
|
|
|
1563
1563
|
MFAEndpoint: MFAEndpoints.ValidateUserMFA,
|
|
1564
1564
|
onAuthComplete: function (state, data) {
|
|
1565
1565
|
console.log("Completed Auth. Handling MFA", state, data);
|
|
1566
|
-
if (state) {
|
|
1566
|
+
if (state && (data === null || data === void 0 ? void 0 : data.isValid)) {
|
|
1567
1567
|
// Call completeMFA to update context state
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
});
|
|
1573
|
-
}
|
|
1568
|
+
console.log("IN Complete MFA Block. Handling MFA", data);
|
|
1569
|
+
completeMFA === null || completeMFA === void 0 ? void 0 : completeMFA(data).catch(function (error) {
|
|
1570
|
+
console.error("Failed to complete MFA:", error);
|
|
1571
|
+
});
|
|
1574
1572
|
setShowSuccessAnimation(true);
|
|
1575
1573
|
toast.success(jsxs("div", { className: "flex items-center gap-2 text-sm text-green-600 bg-green-50 p-3 rounded-lg", children: [jsx(ShieldCheck, { className: "w-4 h-4" }), jsxs("span", { children: ["Multi-Factor Authentication Successful. ", data === null || data === void 0 ? void 0 : data.message] })] }));
|
|
1576
1574
|
setTimeout(function () { return onComplete === null || onComplete === void 0 ? void 0 : onComplete(true); }, 2000);
|