@nibssplc/cams-sdk-react 1.0.0-rc.96 → 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 +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1584,14 +1584,12 @@ var MFAOptions = function (_a) {
|
|
|
1584
1584
|
MFAEndpoint: MFAEndpoints.ValidateUserMFA,
|
|
1585
1585
|
onAuthComplete: function (state, data) {
|
|
1586
1586
|
console.log("Completed Auth. Handling MFA", state, data);
|
|
1587
|
-
if (state) {
|
|
1587
|
+
if (state && (data === null || data === void 0 ? void 0 : data.isValid)) {
|
|
1588
1588
|
// Call completeMFA to update context state
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
});
|
|
1594
|
-
}
|
|
1589
|
+
console.log("IN Complete MFA Block. Handling MFA", data);
|
|
1590
|
+
completeMFA === null || completeMFA === void 0 ? void 0 : completeMFA(data).catch(function (error) {
|
|
1591
|
+
console.error("Failed to complete MFA:", error);
|
|
1592
|
+
});
|
|
1595
1593
|
setShowSuccessAnimation(true);
|
|
1596
1594
|
sonner.toast.success(jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-sm text-green-600 bg-green-50 p-3 rounded-lg", children: [jsxRuntime.jsx(lucideReact.ShieldCheck, { className: "w-4 h-4" }), jsxRuntime.jsxs("span", { children: ["Multi-Factor Authentication Successful. ", data === null || data === void 0 ? void 0 : data.message] })] }));
|
|
1597
1595
|
setTimeout(function () { return onComplete === null || onComplete === void 0 ? void 0 : onComplete(true); }, 2000);
|