How to rewrite OWIN cookie manually (MVC5)

I am using IUserSecurityStampStore to implement logout functions. Everything seems to be working fine, however I have a problem that every time the user changes his password, then she logs out.

One way around this problem is to call SignIn in Manage -Action from AccountController after changing the password.

This seems to work, but I think this is a bit awkward and probably not the right way.

That is why my questions are:

  • How can I get OWIN to rewrite cookie for current login? user?
  • If the above path is the right way, how do I know if the user wants to have her cookie permanent or not (SignIn wants this information)?
+1
source share
1 answer

So, the patterns and templates call SignIn after the user does something, which leads to a change in the security brand. Unfortunately, you don’t have a great way to restore the cookie to a constant state in this scenario, this is what we will try to address in a future update.

I logged a problem to track this along with other related problems: https://github.com/aspnet/Identity/issues/135

+2
source

All Articles