【发布时间】:2013-12-13 14:55:42
【问题描述】:
为什么此示例在使用 ApplicationCookie 登录之前调用 ExternalCookie 的 SignOut?它只是一种确保身份验证信息干净的方法吗? (完整的例子在这里:http://www.asp.net/identity/overview/getting-started/introduction-to-aspnet-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);
}
【问题讨论】:
标签: c# asp.net asp.net-identity