public async Task <IActionResult> RemoveLogin(RemoveLoginViewModel account) { ManageMessageId?message = ManageMessageId.Error; var user = await GetCurrentUserAsync(); if (user != null) { var result = await _userManager.RemoveLoginAsync(user, account.LoginProvider, account.ProviderKey); if (result.Succeeded) { await _signInManager.SignInAsync(user, isPersistent : false); message = ManageMessageId.RemoveLoginSuccess; } } return(RedirectToAction(nameof(ManageLogins), new { Message = message })); }