@nibssplc/cams-sdk-react 1.0.0-rc.102 → 1.0.0-rc.103
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 +14 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +14 -10
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1555,16 +1555,20 @@ var MFAOptions = function (_a) {
|
|
|
1555
1555
|
var _f = useState(false), showSuccessAnimation = _f[0], setShowSuccessAnimation = _f[1];
|
|
1556
1556
|
var _g = useState(null), authType = _g[0], setAuthType = _g[1];
|
|
1557
1557
|
var context = useCAMSContext();
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1558
|
+
// Type-safe extraction of completeMFA and logout
|
|
1559
|
+
var completeMFA = context.authMode === "MSAL"
|
|
1560
|
+
? context.completeMFA
|
|
1561
|
+
: function (data) { return __awaiter$1(void 0, void 0, void 0, function () { return __generator$1(this, function (_a) {
|
|
1562
|
+
return [2 /*return*/, data];
|
|
1563
|
+
}); }); };
|
|
1564
|
+
var logout = context.authMode === "MSAL"
|
|
1565
|
+
? context.logout
|
|
1566
|
+
: function () { return __awaiter$1(void 0, void 0, void 0, function () { return __generator$1(this, function (_a) {
|
|
1567
|
+
return [2 /*return*/];
|
|
1568
|
+
}); }); };
|
|
1565
1569
|
var authenticate = useWebAuthn().authenticate;
|
|
1566
1570
|
var authenticator = new CAMSMFAAuthenticator();
|
|
1567
|
-
var
|
|
1571
|
+
var _h = useOTPHandler({
|
|
1568
1572
|
email: ((_c = (_b = context.user) === null || _b === void 0 ? void 0 : _b.profile) === null || _c === void 0 ? void 0 : _c.email) || context.email,
|
|
1569
1573
|
appCode: context.appCode || "",
|
|
1570
1574
|
MFAEndpoint: MFAEndpoints.ValidateUserMFA,
|
|
@@ -1603,9 +1607,9 @@ var MFAOptions = function (_a) {
|
|
|
1603
1607
|
}
|
|
1604
1608
|
});
|
|
1605
1609
|
}); },
|
|
1606
|
-
}), handleSubmitOTP =
|
|
1610
|
+
}), handleSubmitOTP = _h.handleSubmitOTP, loading = _h.loading,
|
|
1607
1611
|
// setLoading,
|
|
1608
|
-
attemptCount =
|
|
1612
|
+
attemptCount = _h.attemptCount, remainingAttempts = _h.remainingAttempts, isMaxAttemptsReached = _h.isMaxAttemptsReached, resetAttempts = _h.resetAttempts;
|
|
1609
1613
|
var handleGoBack = function () {
|
|
1610
1614
|
setAuthType(null);
|
|
1611
1615
|
setOtpVisible(false);
|