This userview element allows LDAP users to Activate/Deactivate their MFA.
Plugins Available in the Bundle:
This plugin bundle is compatible with Joget DX 7 and DX 8.
The user can see whether MFA is currently enabled or disabled for their account. If MFA is not yet configured, the menu provides a way for users to initiate setup. For example, using a QR code for an authenticator app like Google Authenticator or Microsoft Authenticator. If MFA is already enabled, the user may be allowed to disable it, depending on the admin policy.

Figure 1: Expected Outcome of the User Profile MFA Menu

Once the TOTP Authenticator has been enabled, users will be able to enable MFA individually in their custom user profile.

Figure 4: Configuring Custom User Profile MFA Menu in the UI menu


You will need to customize this plugin to better suit your preferences.
If you want to enforce Multi-Factor Authentication (MFA) for all users, please use the following script.
Navigate to UI > Settings > Theme > Advanced > Custom JavaScript, add the following script to the UI settings as shown in the code block and screenshot below:
var currentUserUsername = "#currentUser.username#";
$(document).ready(function () {
if (
currentUserUsername &&
!currentUserTotpSecret &&
!sessionStorage.getItem('mfaDialogShown')
) {
var appId = 'customProfileMfa';
var uiId = 'v';
var menuId = 'user_profile_mfa';
var dialog = new PopupDialog(`#request.baseURL#/web/userview/${appId}/${uiId}/_/${menuId}?embed=true`);
dialog.show();
sessionStorage.setItem('mfaDialogShown', 'true');
setTimeout(function() {
$("div.ui-widget-overlay.ui-front").attr("id", "specialTosOverlay");
$("div#specialTosOverlay").off("click");
$("button.ui-dialog-titlebar-close").attr("id", "specialTosClose");
$("button#specialTosClose").remove();
}, 500);
}
}); |