Perché questo esempio chiama SignOut per ExternalCookie prima di accedere con un ApplicationCookie? È solo un modo per assicurarsi che le informazioni di autenticazione siano pulite? (L'esempio completo è qui: http://www.asp.net/identity/overview/getting-started/introduction-to-aspnet-identity)Perché chiamare SignOut (DefaultAuthenticationTypes.ExternalCookie) prima dell'uso di ApplicationCookie con ASP.Net Identity?
private async Task SignInAsync(ApplicationUser user, bool isPersistent)
{
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
var identity = await UserManager.CreateIdentityAsync(
user, DefaultAuthenticationTypes.ApplicationCookie);
AuthenticationManager.SignIn(
new AuthenticationProperties() {
IsPersistent = isPersistent
}, identity);
}
Questo è quello che ho capito –
Contextual Explaination https://stackoverflow.com/questions/26166826/usecookieauthentication-vs-useexternalsignincookie – rism