public IActionResult Reset2FA() { string email = TempData["LoginEmail"].ToString(); //Two Factor Authentication Setup TwoFactorAuthenticator TwoFacAuth = new TwoFactorAuthenticator(); User loggingIn = _context.GetUserByEmail(email); string UserUniqueKey = (email + GoogleAuthKey); TempData["UserUniqueKey"] = UserUniqueKey; //Session var setupInfo = TwoFacAuth.GenerateSetupCode("Centrics Network", email, UserUniqueKey, 300, 300); ViewBag.Message = "Enter your code displayed in Google Authenticator."; ViewBag.BarcodeImageUrl = setupInfo.QrCodeSetupImageUrl; ViewBag.SetupCode = setupInfo.ManualEntryKey; TempData["LoginEmail"] = email; _context.Reset2FactorAuth(email); _context.LogAction("2 Factor Authentication", "User reset 2 Factor Authentication.", _context.GetUserByEmail(email)); return(View("Send2FA")); }