This commit is contained in:
Hao Kung 2016-03-07 14:01:34 -08:00
Родитель e54b539d41
Коммит e5dcc78153
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -383,7 +383,7 @@ namespace MusicStore.Controllers
ViewBag.ReturnUrl = returnUrl;
ViewBag.LoginProvider = loginInfo.LoginProvider;
// REVIEW: handle case where email not in claims?
var email = loginInfo.ExternalPrincipal.FindFirstValue(ClaimTypes.Email);
var email = loginInfo.Principal.FindFirstValue(ClaimTypes.Email);
return View("ExternalLoginConfirmation", new ExternalLoginConfirmationViewModel { Email = email });
}
}
@ -413,7 +413,7 @@ namespace MusicStore.Controllers
#if TESTING
//Just for automated testing adding a claim named 'ManageStore' - Not required for production
var manageClaim = info.ExternalPrincipal.Claims.Where(c => c.Type == "ManageStore").FirstOrDefault();
var manageClaim = info.Principal.Claims.Where(c => c.Type == "ManageStore").FirstOrDefault();
if (manageClaim != null)
{
await UserManager.AddClaimAsync(user, manageClaim);