Files
ravenqbi/AyaNovaQBI/tfa.cs
2022-06-20 22:16:12 +00:00

47 lines
1.0 KiB
C#

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();
}
}
}