How to get OWIN cookie value right after calling IauthenticationManager.SignIn?

ClaimsIdentity ident = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
AuthManager.SignOut();
AuthManager.SignIn(new AuthenticationProperties { IsPersistent = userInfo.rememberMe }, ident);
//I would like to get the value here

So, I tried to use HttpContext.Request.Cookies["cookieName"].Value, but it does not work. In fact, when I did HttpContext.Response.Cookies.Count, it returned 0.

+4
source share
1 answer

The authentication manager does not set a cookie on the point. It only sets up a callback with an authentication object to be written to the cookie. Thus, the method SignInonly stores the values ​​in memory until the response is sent. I have done write about this recently .

, cookie, OWIN, cookie.

cookie?

0

All Articles