private async Task SignInAsync(ApplicationUser user, bool isPersistent) { AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie); ///Open Question- Hear it create claimIdentity. But we nothing add as such Claims but just User object. //public virtual Task<ClaimsIdentity> CreateIdentityAsync(TUser user, string authenticationType); var identity = await UserManager1.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie); //var identity = await UserManager1.CreateAsync(user);//, DefaultAuthenticationTypes.ApplicationCookie); AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity); }
protected void UserManagerView_Activate(object sender, EventArgs e) { UserManager1.Reset(); }