This commit is contained in:
46
AyaNovaQBI/tfa.cs
Normal file
46
AyaNovaQBI/tfa.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AyaNovaQBI
|
||||
{
|
||||
public partial class tfa : Form
|
||||
{
|
||||
public string TFACode { get; set; }
|
||||
public tfa()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void auth_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
private async void btnVerifyCode_click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
var res = await util.AuthenticateTFAAsync(ed);
|
||||
if (!res)
|
||||
{
|
||||
MessageBox.Show("Login failed");
|
||||
btnLogin.Enabled = btnTest.Enabled = true;
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
return;
|
||||
}
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user