This commit is contained in:
@@ -12,7 +12,7 @@ namespace AyaNovaQBI
|
||||
{
|
||||
public partial class tfa : Form
|
||||
{
|
||||
public string TFACode { get; set; }
|
||||
public string TFAPin { get; set; }
|
||||
public tfa()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -24,18 +24,15 @@ namespace AyaNovaQBI
|
||||
}
|
||||
|
||||
|
||||
private async void btnVerifyCode_click(object sender, EventArgs e)
|
||||
private void btnVerifyCode_click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
var res = await util.AuthenticateTFAAsync(ed);
|
||||
if (!res)
|
||||
|
||||
TFAPin = edTFACode.Text;
|
||||
if (string.IsNullOrWhiteSpace(TFAPin))
|
||||
{
|
||||
MessageBox.Show("Login failed");
|
||||
btnLogin.Enabled = btnTest.Enabled = true;
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
MessageBox.Show("TFA Code is required to log in");
|
||||
return;
|
||||
}
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user