@nibssplc/cams-sdk-react 0.0.1-beta.68 → 0.0.1-beta.69
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 +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -301,7 +301,6 @@ function useCAMSMSALAuth(options) {
|
|
|
301
301
|
setRequiresMFA(true);
|
|
302
302
|
}
|
|
303
303
|
console.log("App Code >>>", options.appCode);
|
|
304
|
-
console.log("MFA Endpoint >>>", options.MFAEndpoint);
|
|
305
304
|
}
|
|
306
305
|
else {
|
|
307
306
|
localStorage.removeItem(storageKey);
|
|
@@ -1838,18 +1837,18 @@ var MFAOptions = function (_a) {
|
|
|
1838
1837
|
setAuthType(null);
|
|
1839
1838
|
setOtpVisible(false);
|
|
1840
1839
|
setValue("");
|
|
1841
|
-
}, children: jsxRuntimeExports.jsxs(DialogContent, { className: "space-y-2", children: [jsxRuntimeExports.jsx("div", { className: "absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-lime-400 to-emerald-600" }), jsxRuntimeExports.jsx(DialogHeader, { className: "w-full", children: jsxRuntimeExports.jsx(DialogTitle, { className: "text-center", children: "Email OTP" }) }), jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [jsxRuntimeExports.jsx(GenericOTPVerifier, { value: value, setValue: setValue, isDisabled: loading || isMaxAttemptsReached, onChangeOTP: function (code) {
|
|
1840
|
+
}, children: jsxRuntimeExports.jsxs(DialogContent, { className: "space-y-2 w-[425px] max-w-[80%]", children: [jsxRuntimeExports.jsx("div", { className: "absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-lime-400 to-emerald-600" }), jsxRuntimeExports.jsx(DialogHeader, { className: "w-full", children: jsxRuntimeExports.jsx(DialogTitle, { className: "text-center", children: "Email OTP" }) }), jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [jsxRuntimeExports.jsx(GenericOTPVerifier, { value: value, setValue: setValue, isDisabled: loading || isMaxAttemptsReached, onChangeOTP: function (code) {
|
|
1842
1841
|
setLastOTPCode(code);
|
|
1843
1842
|
return handleSubmitOTP(code);
|
|
1844
1843
|
}, fieldName: "EmailOTP", attemptCount: attemptCount, remainingAttempts: remainingAttempts, isMaxAttemptsReached: isMaxAttemptsReached }), jsxRuntimeExports.jsx(Button, { variant: "ghost", className: "w-full text-sm", onClick: handleGoBack, children: "\u2190 Choose different method" })] })] }) }));
|
|
1845
1844
|
}
|
|
1846
1845
|
else if (authType === "AuthenticatorCode") {
|
|
1847
|
-
content = (jsxRuntimeExports.jsx(Dialog, { open: otpVisible, onOpenChange: handleGoBack, children: jsxRuntimeExports.jsxs(DialogContent, { className: "space-y-2", children: [jsxRuntimeExports.jsx("div", { className: "absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-lime-400 to-emerald-600" }), jsxRuntimeExports.jsx(DialogHeader, { className: "w-full", children: jsxRuntimeExports.jsx(DialogTitle, { className: "text-center", children: "Authenticator App" }) }), loading ? (jsxRuntimeExports.jsx("div", { className: "p-3 h-full flex justify-center items-center", children: jsxRuntimeExports.jsx(LoadingSpinner, {}) })) : (jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [jsxRuntimeExports.jsx(CardDescription, { className: "text-sm text-gray-600 text-center", children: "Enter the 6-digit Code from your Authenticator app" }), jsxRuntimeExports.jsx(GenericOTPVerifier, { value: value, setValue: setValue, isDisabled: loading || isMaxAttemptsReached, onChangeOTP: function (code) {
|
|
1846
|
+
content = (jsxRuntimeExports.jsx(Dialog, { open: otpVisible, onOpenChange: handleGoBack, children: jsxRuntimeExports.jsxs(DialogContent, { className: "space-y-2 w-[425px] max-w-[80%]", children: [jsxRuntimeExports.jsx("div", { className: "absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-lime-400 to-emerald-600" }), jsxRuntimeExports.jsx(DialogHeader, { className: "w-full", children: jsxRuntimeExports.jsx(DialogTitle, { className: "text-center", children: "Authenticator App" }) }), loading ? (jsxRuntimeExports.jsx("div", { className: "p-3 h-full flex justify-center items-center", children: jsxRuntimeExports.jsx(LoadingSpinner, {}) })) : (jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [jsxRuntimeExports.jsx(CardDescription, { className: "text-sm text-gray-600 text-center", children: "Enter the 6-digit Code from your Authenticator app" }), jsxRuntimeExports.jsx(GenericOTPVerifier, { value: value, setValue: setValue, isDisabled: loading || isMaxAttemptsReached, onChangeOTP: function (code) {
|
|
1848
1847
|
setLastOTPCode(code);
|
|
1849
1848
|
return handleSubmitOTP(code);
|
|
1850
1849
|
}, fieldName: "AuthenticatorCode", attemptCount: attemptCount, remainingAttempts: remainingAttempts, isMaxAttemptsReached: isMaxAttemptsReached }), jsxRuntimeExports.jsx(Button, { variant: "ghost", className: "w-full text-sm", onClick: handleGoBack, children: "\u2190 Choose different method" })] }))] }) }));
|
|
1851
1850
|
}
|
|
1852
|
-
return (jsxRuntimeExports.jsx("div", { className: "flex justify-center items-center h-dvh", children: jsxRuntimeExports.jsxs(Card, { className: "
|
|
1851
|
+
return (jsxRuntimeExports.jsx("div", { className: "flex justify-center items-center h-dvh", children: jsxRuntimeExports.jsxs(Card, { className: "space-y-6 p-6 rounded-lg shadow-md", children: [jsxRuntimeExports.jsxs(CardHeader, { children: [jsxRuntimeExports.jsx("div", { className: "flex justify-center items", children: jsxRuntimeExports.jsx("img", { src: OTPAuthenticationImg, alt: "NIBSS Logo", width: 365, height: 365 }) }), jsxRuntimeExports.jsx(CardTitle, { className: "text-3xl font-bold mb-6 text-center", children: "Two-Factor Authentication" }), jsxRuntimeExports.jsx(CardTitle, { className: "text-gray-300 text-base -tracking-wide text-center", children: "Your Microsoft account has been validated. Please complete two-factor authentication to continue." })] }), jsxRuntimeExports.jsx(CardContent, { children: content }), jsxRuntimeExports.jsxs(CardFooter, { className: "flex items-center justify-center mt-6 space-x-2 text-gray-400 text-sm", children: [jsxRuntimeExports.jsx(lucideReact.ShieldCheck, { className: "w-4 h-4 text-[#506f4a] pulse-glow" }), jsxRuntimeExports.jsx("span", { children: "Powered By NIBSS" })] })] }) }));
|
|
1853
1852
|
};
|
|
1854
1853
|
|
|
1855
1854
|
var LoginButton = function () {
|
|
@@ -1875,6 +1874,7 @@ var MFAGate = function (_a) {
|
|
|
1875
1874
|
if (!urlValidation.success) {
|
|
1876
1875
|
throw new Error("Invalid MFAEndpoint: ".concat(urlValidation.error.issues[0].message));
|
|
1877
1876
|
}
|
|
1877
|
+
console.log("MFA Endpoint >>>", MFAEndpoint);
|
|
1878
1878
|
// Only apply MFA gate for MSAL mode
|
|
1879
1879
|
if (context.authMode !== "MSAL") {
|
|
1880
1880
|
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children });
|