CaptchaMVC6Sample.Controllers.ManageController.DisableTwoFactorAuthentication C# (CSharp) Метод

DisableTwoFactorAuthentication() приватный Метод

private DisableTwoFactorAuthentication ( ) : Task
Результат Task
        public async Task<IActionResult> DisableTwoFactorAuthentication()
        {
            var user = await GetCurrentUserAsync();
            if (user != null)
            {
                await _userManager.SetTwoFactorEnabledAsync(user, false);
                await _signInManager.SignInAsync(user, isPersistent: false);
            }
            return RedirectToAction(nameof(Index), "Manage");
        }