mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-14 08:14:59 -05:00
Fixed email and SMS 2FA on style 2 login page.
This commit is contained in:
parent
ce77d331cb
commit
fe0649a2ec
@ -522,7 +522,7 @@
|
|||||||
|
|
||||||
function useEmailToken(panelAction) {
|
function useEmailToken(panelAction) {
|
||||||
if (otpemail != true) return;
|
if (otpemail != true) return;
|
||||||
setDialogMode(1, "Secure Login", 3, useEmailKeyEx, "Send token to registered email address?");
|
setDialogMode(1, "Secure Login", 3, useEmailKeyEx, "Send token to registered email address?", panelAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
function useEmailKeyEx(b, panelAction) {
|
function useEmailKeyEx(b, panelAction) {
|
||||||
@ -539,18 +539,21 @@
|
|||||||
|
|
||||||
function useSMSToken(panelAction) {
|
function useSMSToken(panelAction) {
|
||||||
if (otpsms != true) return;
|
if (otpsms != true) return;
|
||||||
setDialogMode(1, "Secure Login", 3, useSMSTokenEx, "Send token to registered phone number?");
|
setDialogMode(1, "Secure Login", 3, useSMSTokenEx, "Send token to registered phone number?", panelAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
function useSMSTokenEx(b, panelAction) {
|
function useSMSTokenEx(b, panelAction) {
|
||||||
|
console.log('a1', panelAction);
|
||||||
if (panelAction == 1) {
|
if (panelAction == 1) {
|
||||||
Q('hwtokenInput').value = '**sms**';
|
Q('hwtokenInput').value = '**sms**';
|
||||||
QE('tokenOkButton', true);
|
QE('tokenOkButton', true);
|
||||||
Q('tokenOkButton').click();
|
Q('tokenOkButton').click();
|
||||||
|
console.log('a2');
|
||||||
} else if (panelAction == 2) {
|
} else if (panelAction == 2) {
|
||||||
Q('resetHwtokenInput').value = '**sms**';
|
Q('resetHwtokenInput').value = '**sms**';
|
||||||
QE('resetTokenOkButton', true);
|
QE('resetTokenOkButton', true);
|
||||||
Q('resetTokenOkButton').click();
|
Q('resetTokenOkButton').click();
|
||||||
|
console.log('a3');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user