public ActionResult RemoveAccountList()
 {
     return(Task.Run(async() =>
     {
         var linkedAccounts = await Logins.GetLogins(User.Identity.GetUserId());
         ViewBag.ShowRemoveButton = linkedAccounts.Count > 1;
         return (ActionResult)PartialView("_RemoveAccountPartial", linkedAccounts);
     }).Result);
 }
        private async Task <bool> UnlinkAccountForUser(string userId, string loginProvider, string providerKey)
        {
            string ownerAccount = await Logins.GetUserId(loginProvider, providerKey);

            if (ownerAccount == userId)
            {
                if ((await Logins.GetLogins(userId)).Count > 1)
                {
                    await Logins.Remove(userId, loginProvider, providerKey);

                    return(true);
                }
            }
            return(false);
        }