public async Task <IActionResult> OnPostDisableAuthenticatorAsync() { var userId = _currentUserService.UserId; if (String.IsNullOrEmpty(userId)) { return(NotFound($"Unable to load user.")); } await _authenticatorService.SetAuthenticatorEnabledAsync(userId, false); await _authenticatorService.ResetAuthenticatorKeyAsync(userId); _logger.LogInformation("User with ID '{UserId}' has reset their authentication app key.", userId); // await _signInManager.RefreshSignInAsync(user); StatusMessage = "Your authenticator app key has been reset, you will need to configure your authenticator app using the new key."; return(RedirectToPage()); }